Exxxxxxxxxcelent!

Glad we were able to get it going!

-Jesse
On Apr 21, 2015 5:53 PM, "Mert Öztürk" <[email protected]> wrote:

> Thanks Jesse. It worked.
> I couldnt have done it for forever without your help :))
>
> Mert
>
> 22 Nisan 2015 Çarşamba 01:43:05 UTC+3 tarihinde Jesse Gumm yazdı:
>>
>> Oh you're going to want to remove the :8001 from the wss:// request.
>> Since you're proxying the connection, you can use the default wss:// port.
>> On Apr 21, 2015 5:40 PM, "Mert Öztürk" <[email protected]> wrote:
>>
>>> I made the diffrence you said and nginx restarted without fail. This is
>>> the final modified location/
>>>
>>>         location / {
>>>
>>>                proxy_pass http://127.0.0.1:8001;
>>>                proxy_redirect          off;
>>>                proxy_set_header        Host            $host;
>>>                proxy_set_header        X-Real-IP       $remote_addr;
>>>                proxy_set_header        X-Forwarded-For
>>> $proxy_add_x_forwarded_for;
>>>
>>>                proxy_http_version 1.1;
>>>                proxy_set_header Upgrade $http_upgrade;
>>>                proxy_set_header Connection "upgrade";
>>>         }
>>>
>>> But unfortunately i get the same error on browser again as below :(
>>>
>>> WebSocket connection to 'wss://localhost:8001/websocket/ask_service'
>>> failed: Error in connection establishment: net::ERR_CONNECTION_CLOSED
>>>
>>>
>>> Mert
>>>
>>> 22 Nisan 2015 Çarşamba 01:34:39 UTC+3 tarihinde Jesse Gumm yazdı:
>>>>
>>>> Interesting, I'm not familiar with those errors, so I'd just google
>>>> around to see what that means exactly.
>>>>
>>>> -Jesse
>>>>
>>>> On Tue, Apr 21, 2015 at 5:32 PM, Mert Öztürk <[email protected]>
>>>> wrote:
>>>> > Sorry. Here it is;
>>>> >
>>>> > nginx: [emerg] could not build the proxy_headers_hash, you should
>>>> increase
>>>> > either proxy_headers_hash_max_size: 512 or
>>>> proxy_headers_hash_bucket_size:
>>>> > 64
>>>> >
>>>> > 22 Nisan 2015 Çarşamba 01:30:54 UTC+3 tarihinde Jesse Gumm yazdı:
>>>> >>
>>>> >> Maybe it just doesn't like having the X-Forwarded-For header being
>>>> set
>>>> >> twice, you could remove one of them and see if that makes a
>>>> >> difference.
>>>> >>
>>>> >> On Tue, Apr 21, 2015 at 5:29 PM, Jesse Gumm <[email protected]>
>>>> wrote:
>>>> >> > What does the nginx log file say when it fails.  It should have
>>>> some
>>>> >> > entry about why it's not restarting it.
>>>> >> >
>>>> >> > On Tue, Apr 21, 2015 at 5:23 PM, Mert Öztürk <[email protected]>
>>>>
>>>> >> > wrote:
>>>> >> >> Final default looks like this above but nginx is not restarting
>>>> like
>>>> >> >> this;
>>>> >> >>
>>>> >> >>         location / {
>>>> >> >>
>>>> >> >>                proxy_pass http://127.0.0.1:8001;
>>>> >> >>                proxy_redirect          off;
>>>> >> >>                proxy_set_header        Host            $host;
>>>> >> >>                proxy_set_header        X-Real-IP
>>>> $remote_addr;
>>>> >> >>                proxy_set_header        X-Forwarded-For
>>>> >> >> $proxy_add_x_forwarded_for;
>>>> >> >>
>>>> >> >>                proxy_http_version 1.1;
>>>> >> >>                proxy_set_header X-Forwarded-For $remote_addr;
>>>> >> >>                proxy_set_header Upgrade $http_upgrade;
>>>> >> >>                proxy_set_header Connection "upgrade";
>>>> >> >>         }
>>>> >> >>
>>>> >> >> Mert
>>>> >> >>
>>>> >> >> 22 Nisan 2015 Çarşamba 00:51:46 UTC+3 tarihinde Mert Öztürk
>>>> yazdı:
>>>> >> >>>
>>>> >> >>> Hello,
>>>> >> >>>
>>>> >> >>> I set up my cb app under nginx on vps. It is working fine with
>>>> the
>>>> >> >>> path i
>>>> >> >>> followed from here:
>>>> >> >>> https://github.com/ChicagoBoss/ChicagoBoss/wiki/Deploy
>>>> >> >>> Now i am trying to set up ssl on nginx and try to establish
>>>> websocket
>>>> >> >>> handshake between the cb app.
>>>> >> >>> My nginx default file looks like below;
>>>> >> >>>
>>>> >> >>> server {
>>>> >> >>> listen 80 default;
>>>> >> >>> listen [::]:80 default_server ipv6only=on;
>>>> >> >>>
>>>> >> >>>         listen 443 ssl;
>>>> >> >>>
>>>> >> >>> root /usr/share/nginx/html;
>>>> >> >>> index index.html index.htm;
>>>> >> >>>
>>>> >> >>> # Make site accessible from http://localhost/
>>>> >> >>> server_name localhost;
>>>> >> >>>
>>>> >> >>>         ssl_certificate /etc/nginx/ssl/nginx.crt;
>>>> >> >>>         ssl_certificate_key /etc/nginx/ssl/nginx.key;
>>>> >> >>>
>>>> >> >>> location / {
>>>> >> >>> proxy_pass http://127.0.0.1:8001;
>>>> >> >>> proxy_redirect         off;
>>>> >> >>> proxy_set_header       Host               $host;
>>>> >> >>> proxy_set_header       X-Real-IP          $remote_addr;
>>>> >> >>> proxy_set_header       X-Forwarded-For
>>>>  $proxy_add_x_forwarded_for;
>>>> >> >>> }
>>>> >> >>>
>>>> >> >>> When i start the application it gives me the error below;
>>>> >> >>> [blocked] The page at 'https://localhost/' was loaded over
>>>> HTTPS, but
>>>> >> >>> ran
>>>> >> >>> insecure content from
>>>> 'ws://localhost:8001/websocket/ask_service':
>>>> >> >>> this
>>>> >> >>> content should also be loaded over HTTPS.
>>>> >> >>> ask_something.js:53 Uncaught SecurityError: Failed to construct
>>>> >> >>> 'WebSocket': An insecure WebSocket connection may not be
>>>> initiated
>>>> >> >>> from a
>>>> >> >>> page loaded over HTTPS.
>>>> >> >>>
>>>> >> >>> Then i change the line in js file from: wsHost =
>>>> >> >>> "ws://localhost:8001/websocket/myWebsocket   to    wsHost =
>>>> >> >>> "wss://localhost:8001/websocket/myWebsocket
>>>> >> >>>
>>>> >> >>> After this change, error message become like this;
>>>> >> >>> WebSocket connection to
>>>> 'wss://localhost:8001/websocket/ask_service'
>>>> >> >>> failed: Error in connection establishment:
>>>> net::ERR_CONNECTION_CLOSED
>>>> >> >>>
>>>> >> >>> (Also when i change {ssl_enable, true} in boss.config, app
>>>> crashes. My
>>>> >> >>> app
>>>> >> >>> is working with cowboy)
>>>> >> >>>
>>>> >> >>> Is there anyone who implemented ssl with a cb app working with
>>>> >> >>> websocket
>>>> >> >>> before?
>>>> >> >>>
>>>> >> >>>
>>>> >> >>> Thanks
>>>> >> >>> Mert
>>>> >> >>
>>>> >> >> --
>>>> >> >> You received this message because you are subscribed to the
>>>> Google
>>>> >> >> Groups
>>>> >> >> "ChicagoBoss" group.
>>>> >> >> To unsubscribe from this group and stop receiving emails from it,
>>>> send
>>>> >> >> an
>>>> >> >> email to [email protected].
>>>> >> >> Visit this group at http://groups.google.com/group/chicagoboss.
>>>> >> >> To view this discussion on the web visit
>>>> >> >>
>>>> >> >>
>>>> https://groups.google.com/d/msgid/chicagoboss/5ae1739e-236e-4aeb-93fc-03cad7c232c8%40googlegroups.com.
>>>>
>>>> >> >>
>>>> >> >> For more options, visit https://groups.google.com/d/optout.
>>>> >> >
>>>> >> >
>>>> >> >
>>>> >> > --
>>>> >> > Jesse Gumm
>>>> >> > Owner, Sigma Star Systems
>>>> >> > 414.940.4866 || sigma-star.com || @jessegumm
>>>> >>
>>>> >>
>>>> >>
>>>> >> --
>>>> >> Jesse Gumm
>>>> >> Owner, Sigma Star Systems
>>>> >> 414.940.4866 || sigma-star.com || @jessegumm
>>>> >
>>>> > --
>>>> > You received this message because you are subscribed to the Google
>>>> Groups
>>>> > "ChicagoBoss" group.
>>>> > To unsubscribe from this group and stop receiving emails from it,
>>>> send an
>>>> > email to [email protected].
>>>> > Visit this group at http://groups.google.com/group/chicagoboss.
>>>> > To view this discussion on the web visit
>>>> >
>>>> https://groups.google.com/d/msgid/chicagoboss/598daf32-74e7-4712-ab53-7b7507c943fb%40googlegroups.com.
>>>>
>>>> >
>>>> > For more options, visit https://groups.google.com/d/optout.
>>>>
>>>>
>>>>
>>>> --
>>>> Jesse Gumm
>>>> Owner, Sigma Star Systems
>>>> 414.940.4866 || sigma-star.com || @jessegumm
>>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "ChicagoBoss" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> Visit this group at http://groups.google.com/group/chicagoboss.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/chicagoboss/29482e39-5bc2-41cd-92e9-347fc711d023%40googlegroups.com
>>> <https://groups.google.com/d/msgid/chicagoboss/29482e39-5bc2-41cd-92e9-347fc711d023%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "ChicagoBoss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> Visit this group at http://groups.google.com/group/chicagoboss.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/chicagoboss/ba32ab27-cc3b-4ab2-81c0-c991ebcef4cc%40googlegroups.com
> <https://groups.google.com/d/msgid/chicagoboss/ba32ab27-cc3b-4ab2-81c0-c991ebcef4cc%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/chicagoboss/CAPTXyXcK0oPoWqbMtdfyn2vXXyJ00LQOREc8eALLxpOR1%2B19jg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to