Skip to content

Instantly share code, notes, and snippets.

@wudi
Forked from mattd/gist:1006398
Created August 5, 2020 09:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wudi/1e1a12f034fd7232f362e1c33241329c to your computer and use it in GitHub Desktop.
Save wudi/1e1a12f034fd7232f362e1c33241329c 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