Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default map needed for reverse proxy of websocket connections #67

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KoenDierckx
Copy link
Contributor

When doing a reverse proxy for a site with websockets, some additional 'http' configuration is needed
By providing this default generic map, the configuration can stay limited to the 'server' block but still use this 'http' variable.

Literal copy from the official documentation
http://nginx.org/en/docs/http/websocket.html

It should not have any impact on performance
http://nginx.org/en/docs/http/ngx_http_map_module.html
Since variables are evaluated only when they are used, the mere declaration even of a large number of “map” variables does not add any extra costs to request processing.

@csandanov
Copy link
Member

this nginx image isn't designed to be used as a reverse proxy, we expect people to use something like traefik for local environments and ingress-nginx in productiono

@KoenDierckx
Copy link
Contributor Author

We do use traefik to proxy dependent on the Host to the correct docker stack
A docker stack for us usually contains 2 services, a nginx reverse proxy and an app backend. The nginx service will handle all static files, while the app handles the actual code (ruby/php/python)
We are not using k8s, and deploy to a single docker server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants