Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save HidemaruOwO/e9517c1f83d6afe74fd6e1de32b5de66 to your computer and use it in GitHub Desktop.
Save HidemaruOwO/e9517c1f83d6afe74fd6e1de32b5de66 to your computer and use it in GitHub Desktop.
NginxでのWebSocketを含めたドメインでのリバースプロキシ
# 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