Skip to content

Instantly share code, notes, and snippets.

@chrishuan9
Created March 29, 2017 06:04
Show Gist options
  • Save chrishuan9/7ee92250c5c05e631e23f82e04cc9c5e to your computer and use it in GitHub Desktop.
Save chrishuan9/7ee92250c5c05e631e23f82e04cc9c5e to your computer and use it in GitHub Desktop.
nginx reverse proxy configuration for node-red
server {
listen 80;
listen 443 ssl http2;
server_name node-red.securise.com;
ssl_certificate /etc/nginx/ssl/nginx.crt;
ssl_certificate_key /etc/nginx/ssl/nginx.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+$
ssl_prefer_server_ciphers On;
ssl_session_cache shared:SSL:128m;
ssl_stapling on;
ssl_stapling_verify on;
resolver 8.8.8.8;
location / {
if ($scheme = http) {
return 301 https://$server_name$request_uri;
}
proxy_pass http://localhost:1880;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location '/.well-known/acme-challenge' {
root /var/www/html;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment