Skip to content

Instantly share code, notes, and snippets.

@ngstigator
Created February 2, 2020 18:12
Show Gist options
  • Save ngstigator/13520a59d51647f0228c01649d701ab0 to your computer and use it in GitHub Desktop.
Save ngstigator/13520a59d51647f0228c01649d701ab0 to your computer and use it in GitHub Desktop.
Nginx try_files with proxy_pass
# https://gist.github.com/mattd/1006398/598df8f218a18bc1b0f3415550b4a369f37afb7c
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