Created
March 4, 2024 10:24
-
-
Save joaquinco/f89afa88a90634d715299a1df74700e7 to your computer and use it in GitHub Desktop.
Nginx Reverse Proxy configuration template (replace $SERVER_NAME and configure TSL certificates with certbot)
This file contains hidden or 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
upstream app_server { | |
server 127.0.0.1:8080; | |
keepalive 16; | |
} | |
server { | |
server_name $SERVER_NAME; | |
add_header X-Frame-Options "DENY"; | |
location / { | |
proxy_pass http://app_server; | |
proxy_http_version 1.1; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header Connection ""; | |
client_max_body_size 20M; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment