Skip to content

Instantly share code, notes, and snippets.

@dublado
Created November 15, 2023 21:27
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 dublado/dd72eccd05cd7aeed3c6af54be8a58f2 to your computer and use it in GitHub Desktop.
Save dublado/dd72eccd05cd7aeed3c6af54be8a58f2 to your computer and use it in GitHub Desktop.
nginx configuration virtual host with proxy
server {
listen 80 default_server;
server_name _;
location / {
# Proxy pass to Traefik
proxy_pass http://traefik-host:port;
# Standard proxy settings
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
# Error pages
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment