Last active
July 26, 2019 08:50
-
-
Save memandip/6a7df0d6926f2d75b23efce2392dec34 to your computer and use it in GitHub Desktop.
Nginx configuration to configure reverse proxy for websocket
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
root projectDirectory; | |
# example root /var/www/html/myAwesomeProject/public; | |
index index.html; | |
server_name domain_name; | |
location /chat/socket { | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
proxy_pass "ws_url"; | |
# example: proxy_pass "https://localhost:8080/chat/socket"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment