Skip to content
Oniry edited this page Apr 30, 2019 · 1 revision

proxy:

in body http:

map $http_upgrade $connection_upgrade {
        default upgrade;
        '' close;
    }

in body server:

location /ws/ {
  proxy_pass url:port;
  proxy_http_version 1.1;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection $connection_upgrade;
}

url:port - app address(exemple: 127.0.0.1:8000)


ssl:

server {
    	listen              443 ssl;
        server_name YourDomainName;
    	ssl_certificate     /etc/nginx/ssl/ssl_certificate.crt;
    	ssl_certificate_key /etc/nginx/ssl/ssl_certificate_key.key;
    	ssl_protocols       TLSv1 TLSv1.1 TLSv1.2;
    	ssl_ciphers         HIGH:!aNULL:!MD5;
       ...

in html page:

replace the port with the port specified in nginx

exemple('priv/static/index.htm'): port = 8001; replaced by port = 433;

Clone this wiki locally