Reputation: 3828
I have a very specific nginx config question:
I need nginx to:
This is the closest I can get:
location = / {
if ($http_upgrade != "websocket") {
# Here lies my problem:
# This returns a http: 302 where i just need it to return the contents
# of index.html
return https://admin.permaconn.com/index.html;
}
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://localhost:8080;
}
I am undergoing a structural change with my app from using nodejs as a front proxy to nginx as a front end proxy.
I must configure nginx this way due to expected behaviour from numerous programs already installed devices (aka legacy).
Upvotes: 3
Views: 4687