upstream site-main-5.6 {
server php-5-6.example.org:1008;
}
server {
listen 80;
server_name site-main.example.org;
root "/home/site-main/htdocs";
location ^~ /gallery/test/ {
default_type "text/plain";
#return 200 "@app root.";
try_files $uri @app;
autoindex off;
}
location @app {
default_type "text/plain";
#return 200 "@app root.";
rewrite_log on;
error_log "/home/site-main/logs/error.debug.log" debug;
include extra/fastcgi_php_fpm;
fastcgi_param SCRIPT_FILENAME "/home/site-main/app/app.php";
fastcgi_pass site-main-5.6;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# deny access to .ht* files
location ~ /\.ht {
deny all;
}
}
This configuration just does not work, unless local webroot mirroring FCGI remote FS.
nginx doesn't even TRY to pass the request to the backend, unless it sees a matching local file.
What I'm missing?
server php-5-6.example.org:1008;
}
server {
listen 80;
server_name site-main.example.org;
root "/home/site-main/htdocs";
location ^~ /gallery/test/ {
default_type "text/plain";
#return 200 "@app root.";
try_files $uri @app;
autoindex off;
}
location @app {
default_type "text/plain";
#return 200 "@app root.";
rewrite_log on;
error_log "/home/site-main/logs/error.debug.log" debug;
include extra/fastcgi_php_fpm;
fastcgi_param SCRIPT_FILENAME "/home/site-main/app/app.php";
fastcgi_pass site-main-5.6;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# deny access to .ht* files
location ~ /\.ht {
deny all;
}
}
This configuration just does not work, unless local webroot mirroring FCGI remote FS.
nginx doesn't even TRY to pass the request to the backend, unless it sees a matching local file.
What I'm missing?