46 lines
1.3 KiB
Plaintext
46 lines
1.3 KiB
Plaintext
server {
|
|
listen 80;
|
|
server_name wstqo.spottorg.ru;
|
|
return 301 https://$server_name$request_uri;
|
|
}
|
|
|
|
upstream centrifugo {
|
|
server centrifugo:8000;
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
server_name wstqo.spottorg.ru;
|
|
|
|
access_log /var/log/nginx/wstqo.spottorg.ru_access.log json;
|
|
error_log /var/log/nginx/wstqo.spottorg.ru_error.log;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/spottorg.ru/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/spottorg.ru/privkey.pem;
|
|
ssl_trusted_certificate /etc/letsencrypt/live/spottorg.ru/chain.pem;
|
|
|
|
location / {
|
|
proxy_pass_header Server;
|
|
proxy_set_header Host $http_host;
|
|
proxy_redirect off;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_pass http://centrifugo;
|
|
}
|
|
location /socket {
|
|
proxy_buffering off;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
proxy_pass http://centrifugo;
|
|
}
|
|
location /connection {
|
|
proxy_buffering off;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
proxy_pass http://centrifugo;
|
|
}
|
|
}
|