Skip to content

Instantly share code, notes, and snippets.

@mattd
Created June 3, 2011 14:12
Show Gist options
  • Save mattd/1006398 to your computer and use it in GitHub Desktop.
Save mattd/1006398 to your computer and use it in GitHub Desktop.
nginx try_files with a proxy_pass
server {
root /var/www/example.com/static;
server_name example.com;
access_log /var/log/nginx/example.com.access.log;
error_log /var/log/nginx/example.com.error.log;
try_files /maintenance.html @proxy;
location @proxy {
proxy_pass http://127.0.0.1:10001;
include /etc/nginx/proxy.conf;
}
}
@broland07
Copy link

What about if your server is not on the localhost? I have an issue with it. Is there any way?

Same problem here. I got error 500 with proxy_pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment