Created
January 14, 2024 09:49
-
-
Save emwadde/9d9f48ff4712e1f91926d36b82bf402b to your computer and use it in GitHub Desktop.
nginx default config
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 / { | |
root /usr/share/nginx/html; | |
index index.html index.htm; | |
} | |
location /health { | |
add_header Content-Type text/plain; | |
return 200 'healthy'; | |
} | |
# for testing/debugging purposes | |
location /proxy { | |
proxy_pass http://127.0.0.1:9000; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
} | |
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
Test/Debug server in Python