Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7908735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:04:57+00:00 2026-06-03T12:04:57+00:00

I am having a problem in connecting through WSS to my server. I followed

  • 0

I am having a problem in connecting through WSS to my server. I followed the following article to setup nginx with websockets: http://www.letseehere.com/reverse-proxy-web-sockets

The following is my nginx config which serves a Play! application:

#user  nobody;
worker_processes  1;  

error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;

events {
    worker_connections  1024;
}

tcp {

     upstream websockets {
      ## Play! WS location
       server 127.0.0.1:9000;
     }    

    server {
        listen 80; 
        listen 8000;
        server_name socket.domain.com;

        tcp_nodelay on; 
        proxy_pass websockets;
        proxy_send_timeout 300;
    }   

     # virtual hosting
     #include /usr/local/nginx/vhosts/*;
}

http {

  server {
        listen 443 ssl;
        server_name socket.artoo.in;

        ssl_certificate      /usr/local/nginx/key/socket.domain.com.crt;
        ssl_certificate_key  /usr/local/nginx/key/socket.domain.com.key;

        ssl_session_timeout  5m;

        ssl_protocols  SSLv2 SSLv3 TLSv1;
        ssl_ciphers  ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
        ssl_prefer_server_ciphers   on;

        location / {
            proxy_pass http://127.0.0.1:9000;
        }
  }
}

While the server is accessible on http://socket.domain.com, https://socket.domain.com, ws://socket.domain.com but not wss://socket.domain.com

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T12:04:59+00:00Added an answer on June 3, 2026 at 12:04 pm

    I have at least solved it for the short term by using stunnel (referring to this article: http://www.darkcoding.net/software/proxy-socket-io-and-nginx-on-the-same-port-over-ssl/).

    Stunnel can convert HTTPS to HTTP and by that token WSS to WS. Nginx served the socket application running on 9000 port as usual:

    /etc/stunnel/stunnel.conf

    [https]
    accept  = 443
    connect = 80 
    TIMEOUTclose = 0
    

    /usr/local/nginx/conf/nginx.conf

    #user  nobody;
    worker_processes  1;  
    
    error_log  logs/error.log;
    #error_log  logs/error.log  notice;
    #error_log  logs/error.log  info;
    
    #pid        logs/nginx.pid;
    
    events {
        worker_connections  1024;
    }
    
    tcp {
    
         upstream websockets {
          ## Play! WS location
           server 127.0.0.1:9000;
           check interval=3000 rise=2 fall=5 timeout=1000;
         }    
    
        server {
            listen 80; 
            listen 8000;
            server_name socket.artoo.in;
    
            tcp_nodelay on; 
            proxy_pass websockets;
            proxy_send_timeout 300;
    
        }   
    
         # virtual hosting
         #include /usr/local/nginx/vhosts/*;
    }
    
    #http {
    #
    #  server {
    #        listen 443 ssl;
    #        server_name socket.artoo.in;
    #
    #        ssl_certificate      /usr/local/nginx/key/socket.domain.com.crt;
    #        ssl_certificate_key  /usr/local/nginx/key/socket.domain.com.key;
    #
    #        ssl_session_timeout  5m;
    #
    #        ssl_protocols  SSLv2 SSLv3 TLSv1;
    #        ssl_ciphers  ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
    #        ssl_prefer_server_ciphers   on;
    #
    #        location / {
    #            proxy_pass http://127.0.0.1:9000;
    #        }
    #  }
    #}
    

    Now the only thing I need to worry about is how to increase the timeout for websockets on nginx, the connection seems to be breaking every 75 secs (default for nginx).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having a problem connecting to the server hosting my webservice when I
I was working through a tutorial at http://fszlin.blogspot.com/2010/05/comsuming-wcf-services-with-android.html and am having a problem. The
I am having problems connecting to a Sqlite database through System.Data.Sqlite. I was trying
I'm having a pretty weird problem with PHP and MySQL. I'm doing the following
Background: we are having issues with one of our GPRS devices connecting through a
I am connecting to a MS SQL server through SQL Alchemy, using pyodbc module.
I'm having a problem converting my program from VS2005 to VS2008. When I run
I am having no problem converting a string to a byteArray of UTF-16 encoded
Having a problem with NSURLConnection, if I create a NSURLConnection and call [connection connectionWithRequest]
I'm having a bit of a problem with converting the result of a MySQL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.