Skip to content

Instantly share code, notes, and snippets.

@kpbowler
Created July 23, 2019 19:22
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 kpbowler/9c33e91ad08c166299c79024fb4d3ebe to your computer and use it in GitHub Desktop.
Save kpbowler/9c33e91ad08c166299c79024fb4d3ebe to your computer and use it in GitHub Desktop.
Nginx proxy pass
server {
server_name example.com www.example.com;
root /path/to/codebase;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
charset utf-8;
location / {
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 https;
proxy_set_header X-Forwarded-Port 443;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:3000;
}
# Certbot config goes here!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment