Skip to content

Instantly share code, notes, and snippets.

@benfavre
Created May 25, 2021 14:14
Show Gist options
  • Save benfavre/e6f29c8544d0a73c7b4215e4f54ae0da to your computer and use it in GitHub Desktop.
Save benfavre/e6f29c8544d0a73c7b4215e4f54ae0da to your computer and use it in GitHub Desktop.
nginx conf proxy node
server {
server_name monssite.fr;
listen 80;
return 307 https://$host$request_uri;
}
server {
server_name monssite.fr;
listen 443 ssl http2; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-Proto https;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment