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.
- nginx version: nginx/1.12.2
- Phusion Passenger 5.2.1
- 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;}}