Skip to content

Instantly share code, notes, and snippets.

@qzaidi
Created February 20, 2014 10:49
Show Gist options
  • Save qzaidi/9111051 to your computer and use it in GitHub Desktop.
Save qzaidi/9111051 to your computer and use it in GitHub Desktop.
stacked nginx
recursive_error_pages on;
location / {
try_files $uri @nodesrv;
}
location @nodesrv {
proxy_pass http://localhost:5000;
proxy_intercept_errors on;
error_page 404 = @phpsrv;
}
location @phpsrv {
root /data/paytmweb/current/www/;
fastcgi_pass unix:/var/run/php5-fpm-www.paytm.com.socket;
fastcgi_index index.$1;
fastcgi_param SCRIPT_FILENAME /data/paytmweb/current/www$fastcgi_script_name;
include fastcgi_params;
fastcgi_intercept_errors on;
error_page 500 501 502 /500.html;
error_page 404 /404.html;
}
location = /404.html {
root /data/paytmweb/current/www/;
}
location = /500.html {
root /data/paytmweb/current/www/;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment