Skip to content

Instantly share code, notes, and snippets.

@sadesyllas
Forked from mattd/gist:1006398
Created January 18, 2018 14:48
Show Gist options
  • Select an option

  • Save sadesyllas/b5a912d448c28c734d14a79744028763 to your computer and use it in GitHub Desktop.

Select an option

Save sadesyllas/b5a912d448c28c734d14a79744028763 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