server { listen 80; server_name choochop.ru; location / { return 301 https://$server_name$request_uri; } } server { listen 443 ssl http2; server_name choochop.ru; error_log /var/log/nginx/error.log; access_log /var/log/nginx/access.log; #ssl on; ssl_certificate_key /etc/pki/tls/private/nginx-selfsigned.key; ssl_certificate /etc/pki/tls/certs/nginx-selfsigned.crt; ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3; ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4; ssl_prefer_server_ciphers on; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; proxy_http_version 1.1; location /restapi/socket/ { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_pass http://127.0.0.1:8088/restapi/socket/; proxy_redirect default; proxy_read_timeout 1d; } ## web-socket for idp shell to IDP location /idp-web/socket/shell { proxy_set_header Host $host; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_pass http://127.0.0.1:8088/idp-web/socket/shell; proxy_redirect default; proxy_read_timeout 1d; } ## web-socket for idp json to IDP location /idp-web/socket/shell/json { proxy_set_header Host $host; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_pass http://127.0.0.1:8088/idp-web/socket/shell/json; proxy_redirect default; proxy_read_timeout 1d; } location / { proxy_set_header Connection ""; proxy_pass http://127.0.0.1:8088/; proxy_redirect default; } }