我的网络服务器是nginx,在Rails和AngularJS应用程序之间使用websockets。我用puma和乘客服务尝试了它们,但它们都没有工作,但它有时适用于特定的互联网连接,我不知道为什么:(请帮我找到原因。
- nginx版本: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;}}