Skip to content

Instantly share code, notes, and snippets.

@shov
Created March 18, 2020 08:41
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 shov/fa6399c0ab6c5d11706a7481c4a5384f to your computer and use it in GitHub Desktop.
Save shov/fa6399c0ab6c5d11706a7481c4a5384f to your computer and use it in GitHub Desktop.
Nginx to Nodejs proxy with SSL
server {
listen 80;
server_name example.com;
# Redirect all traffic to SSL
rewrite ^ https://$server_name$request_uri? permanent;
}
server {
listen 443 ssl;
ssl_protocols SSLv3 TLSv1;
ssl_ciphers ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM;
server_name example.com;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log info;
keepalive_timeout 75 75;
ssl_certificate /var/www/certs/example.com.crt;
ssl_certificate_key /var/www/certs/example.com.key;
ssl_session_timeout 5m;
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
proxy_pass "https://example.com:9000";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment