0

My web server is nginx and using websockets between Rails and AngularJS applications. I tried it with puma and passenger services and both of them not working, But It sometimes works with specific internet connection, I don't know why :( please help me to find the reasons.

  1. nginx version: nginx/1.12.2
  2. Phusion Passenger 5.2.1
  3. Rails 5.1.5
server {
listen 80;
server_name server_ip;

# Tell Nginx and Passenger where your app's 'public' directory is
root /home/ubuntu/project_path/public/;

rails_env development;

# Turn on Passenger
passenger_enabled on;
passenger_ruby /home/ubuntu/.rvm/gems/ruby-2.3.3/wrappers/ruby;

location /cable{
   passenger_app_group_name foo_websocket;
   passenger_force_max_concurrent_requests_per_process 0;}}
2
  • Would help to see your nginx configuration if it stops working when nginx takes place
    – kimy82
    Apr 13, 2018 at 12:56
  • @kimy82 Thank you, I added nginx configuration with passenger service, I'm really suprised, why its working on some of wireless connection and why its not others from one laptop :)
    – sjcoder
    Apr 13, 2018 at 13:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.