http://prntscr.com/coliya -Chrome http://prntscr.com/coljez -Opera
NGINX server {
listen 0.0.0.0:80; listen 0.0.0.0:443 ssl; root /usr/share/nginx/html; index index.html index.htm;
ssl on; ssl_certificate /etc/ssl/certs/ssl-bundle.crt; ssl_certificate_key /etc/ssl/private/budokai-online_com.key; ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kED$ ssl_dhparam /etc/ssl/private/dhparmas.pem; ssl_prefer_server_ciphers on; ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
if ($ssl_protocol = "") { rewrite ^ https://$host$request_uri? permanent;
} large_client_header_buffers 8 32k; location / {
proxy_http_version 1.1;
proxy_set_header Accept-Encoding ""; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X_FORWARDED_PROTO https; proxy_set_header X-NginX-Proxy true; proxy_buffers 8 32k; proxy_buffer_size 64k; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_read_timeout 86400; proxy_pass http://budokai-online.com:8080 ;
}
The problem I’m having is that some computers and some browsers are being redirected when trying to get a connection to the websocket. When that 302 error shows up, the '/*' routes has been activated! This route redirects the user to the login page as you saw in the redirect response.The websocket upgrade request is turned into an ordinary http request somehow, somewhere! This seems to be where the problem is. What can be causing this?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
You may need to update
if ($sslprotocol = "") {
rewrite ^ https://$host$requesturi? permanent;
}
to this
if ($https = "") {
rewrite ^ https://$host$requesturi? permanent;
}
I haven’t seen the use of $sslprotocol before in this context and wasn’t able to find anything through a google search.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.