tools-compose/nginx.conf

44 lines
1.6 KiB
Nginx Configuration File

server {
index index.php index.html;
server_name _;
root /www;
# Redirect old path to newer ones
rewrite ^/SH4compatibility/(.*)$ $scheme://$http_host/SH4compatibilityTool/$1 permanent;
rewrite ^/fxi2g1r/(.*)$ $scheme://$http_host/G1rFxiTools/FXItoG1R/$1 permanent;
rewrite ^/G1MtoG1R/(.*)$ $scheme://$http_host/G1rFxiTools/G1MtoG1R/$1 permanent;
rewrite ^/PicViewer/(.*)$ $scheme://$http_host/G1rFxiTools/PicViewer/$1 permanent;
rewrite ^/festivalgo/(.*)$ $scheme://$http_host/FestivAlgo/$1 permanent;
# Tools homepage
rewrite ^(/_system/.*)$ /home/$1;
rewrite ^/?$ /home/index.php;
# Forward to the main php-fpm container
location ~ ^/(home|EactMaker|SH4compatibilityTool|G1rFxiTools|SpriteCoder)/.*\.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass phpfpm-main:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
# Forward to the festivalgo php-fpm container
location ~ ^/FestivAlgo/.*\.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass phpfpm-festivalgo:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
# If we still have php there, that's an error!
location ~ \.php$ {
return 500;
}
}