Skip to content

Instantly share code, notes, and snippets.

@piotr-galas
Created November 15, 2016 08:15
Show Gist options
  • Save piotr-galas/b109ede386ab60a23612fbdecf457d18 to your computer and use it in GitHub Desktop.
Save piotr-galas/b109ede386ab60a23612fbdecf457d18 to your computer and use it in GitHub Desktop.
upstream action {
server unix:/srv/www/development/action-cable/tmp/sockets/puma.sock fail_timeout=0;
}
server {
server_name .actioncable.kulisz.eu;
keepalive_timeout 5;
root /srv/www/development/action-cable/public;
client_max_body_size 4G;
location / {
try_files $uri @action;
}
location @action {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://action;
# proxy_set_header X-Forwarded-Proto $scheme;
# proxy_http_version 1.1;
# proxy_set_header Upgrade "websocket";
# proxy_set_header Connection "upgrade";
}
location /cable {
proxy_pass http://action;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-Proto $scheme;
# proxy_redirect off;
# proxy_set_header Host $http_host;
# proxy_set_header X-Real-IP $remote_addr;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment