Skip to content
This repository
tree: 1b46d99743
Fetching contributors…

Cannot retrieve contributors at this time

file 30 lines (29 sloc) 0.932 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
## Access over HTTPS (with redirection from HTTP -> HTTPS)
server {
  listen 443;
  listen [::]:443 default ssl ipv6only=on;
  ssl on;
  ssl_certificate /var/myapp/ssl/ssl.crt;
  ssl_certificate_key /var/myapp/ssl/ssl.key;
  ssl_protocols SSLv3 TLSv1;
  ssl_ciphers RC4:ALL:-LOW:-EXPORT:!ADH:!MD5;
  ssl_prefer_server_ciphers on;
  ssl_session_cache shared:SSL:10m;
  ssl_session_timeout 10m;
  access_log /var/log/nginx/access.log;
  location / {
    root /var/myapp/www;
    index index.html;
    error_page 404 = @backend;
  }
  location @backend {
    proxy_pass http://127.0.0.1:3000;
    proxy_set_header X-Client-IP $remote_addr;
  }
}

server {
  listen 80;
  listen [::]:80 default ipv6only=on;
  access_log /var/log/nginx/access.log;
  rewrite ^(.*) https://$host$1 permanent;
}
Something went wrong with that request. Please try again.