Skip to content

Commit

Permalink
use a nested location definition for /websocket/
Browse files Browse the repository at this point in the history
Co-authored-by: Jane Sandberg <[email protected]>
  • Loading branch information
acozine and sandbergja committed Jan 26, 2024
1 parent 750951e commit 02e6c9e
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions roles/nginxplus/files/conf/http/ansible-tower_prod.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,18 @@ server {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
#attempt to enable websocket
#proxy_set_header Host $host; not sure if we can use this
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_cache ansible-towercache;
proxy_intercept_errors on;
health_check interval=10 fails=3 passes=2;

location /websocket/ {
proxy_pass https://ansible-tower;
#attempt to enable websocket
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
}

include /etc/nginx/conf.d/templates/errors.conf;
Expand Down

0 comments on commit 02e6c9e

Please sign in to comment.