Skip to content

Instantly share code, notes, and snippets.

@ghostffcode
Forked from mattd/gist:1006398
Created March 8, 2017 17:14
Show Gist options
  • Save ghostffcode/d7626d6b9dbe51ac4ec21e5501292255 to your computer and use it in GitHub Desktop.
Save ghostffcode/d7626d6b9dbe51ac4ec21e5501292255 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;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment