Skip to content

Instantly share code, notes, and snippets.

@joaquinco
Created March 4, 2024 10:24
Show Gist options
  • Save joaquinco/f89afa88a90634d715299a1df74700e7 to your computer and use it in GitHub Desktop.
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)
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