Created
November 15, 2023 21:27
-
-
Save dublado/dd72eccd05cd7aeed3c6af54be8a58f2 to your computer and use it in GitHub Desktop.
nginx configuration virtual host with proxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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