reorganized
i believe everything works
This commit is contained in:
57
apps/podcast/podcast.nginx.conf
Normal file
57
apps/podcast/podcast.nginx.conf
Normal file
@@ -0,0 +1,57 @@
|
||||
location ~ ^/podcast/feed.xml$ {
|
||||
return 301 /podcast/01sw;
|
||||
}
|
||||
|
||||
#/podcast/media/2022-03-09-ep42.mp3
|
||||
location ~* /podcast/media/(?:.*)-(?<season_2>s02)?(?<episode_label>ep\d+)(\.mp3) {
|
||||
if ($season_2 = "s02") {
|
||||
return 301 /dir2cast/02ram/$season_2$episode_label.mp3;
|
||||
}
|
||||
|
||||
return 301 /dir2cast/01sw/$episode_label.mp3;
|
||||
}
|
||||
|
||||
#location /podcast/dir2cast.php {
|
||||
# rewrite /podcast/(dir2cast.php) /dir2cast/$1;
|
||||
#}
|
||||
|
||||
location /podcast {
|
||||
return 301 /podcast/;
|
||||
}
|
||||
|
||||
|
||||
location /podcast/ {
|
||||
alias /var/www/podcast/;
|
||||
autoindex on;
|
||||
|
||||
if ( $arg_name) {
|
||||
return 301 /podcast/media/$arg_name;
|
||||
}
|
||||
|
||||
location ~* (/podcast/)(?<dir>.*)/feed {
|
||||
|
||||
rewrite /podcast/ /dir2cast/dir2cast.php?dir=podcast/$dir;
|
||||
}
|
||||
|
||||
location ~ (\.php|\.ini|\.conf)$ {
|
||||
return 403;
|
||||
}
|
||||
}
|
||||
|
||||
location /dir2cast/ {
|
||||
alias /var/www/dir2cast/;
|
||||
|
||||
location ~ ^/dir2cast/dir2cast.php {
|
||||
# return 501;
|
||||
include fastcgi_params;
|
||||
fastcgi_pass php:9000;
|
||||
add_header x-test "$args" always;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
}
|
||||
|
||||
location ~ (\.php|\.ini)$ {
|
||||
return 403;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user