/faye.js is not available over ssl
Closed this issue · 10 comments
I managed to enable SSL on my server with ryanb's guide at https://github.com/ryanb/private_pub#serving-faye-over-https-with-thin. But I can't connect to 4443 port to load faye.js. Here is some of my config:
config/private_pub.yml
production:
server: "https://<my-website>:4443/faye"
secret_token: "<%= ActiveSupport::SecureRandom.hex(32) %>"
signature_expiration: 86400 # one day
config/private_pub_thin.yml
---
port: 4443
ssl: true
ssl_key_file: <ssl_key>.key
ssl_cert_file: <ssl_cert>.crt
environment: production
rackup: private_pub.ru
daemonize: true
Then start with following command:
bundle exec thin -C config/private_pub_thin.yml start
I dont understand why I can't connect to https://:4443/faye.js Is there anyone successfully setup private_pub over ssl?
Thanks a lot
I am using private_pub with SSL and all works well. When you say you can't connect
what does that mean? Is there any error message?
Thanks a lot for quick reply. When I deployed with capistrano, the website worked normally, however in js console, it said that
GET https://<my-website>:4443/faye.js net::ERR_CONNECTION_REFUSED
even, I managed to ssh and telnet to localhost 4443, the port isn't opened
telnet: Unable to connect to remote host: Connection refused
Did I make something wrong?
Is port 4443 open? Maybe a firewall blocking it? Other than that it looks good to me.
I have no idea to debug it. Do you have any suggestion but I am sure that the firewall blocking isn't a reason.
Thanks @gregmolnar
Where do you host your app? Is it a VPS?
Yes, I host on VPS
Than check with your provider the firewall. If it is an amazon ec2 than you need to open that port for your security group: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/authorizing-access-to-an-instance.html
Thanks a lot for your link, I will check it now.
Finally, I found the problem. I used ssh key file with pem pass phrase, I tried to run thin server, it requested me to enter pem pass phrase, so there's no way to enter the pem pass when I run as daemon. One quick solution here is that generating nopass ssl key file :)
Anyway, thanks @gregmolnar. I am closing this issue now
I am glad you worked it out.