Created
August 15, 2023 06:05
-
-
Save HidemaruOwO/e9517c1f83d6afe74fd6e1de32b5de66 to your computer and use it in GitHub Desktop.
Nginxでの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
# For WebSocket | |
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; | |
} | |
server { | |
server_name sub.domain.tld; | |
# For WebSocket | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection $connection_upgrade; | |
location / { | |
proxy_pass https://localhost:3000/; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment