Created
February 20, 2014 10:49
-
-
Save qzaidi/9111051 to your computer and use it in GitHub Desktop.
stacked nginx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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