Skip to content

Commit

Permalink
nginxの設定例を追加した
Browse files Browse the repository at this point in the history
  • Loading branch information
miminashi committed Oct 15, 2024
1 parent da7b7c3 commit 5a7b330
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#
# nginxの設定例
#
# - Debianの場合は, /etc/nginx/sites-available/default にそのまま置けば動くはず
#
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}

server {
listen 80;
listen [::]:80;

server_name _;

location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;

# WebSocketの設定
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;

proxy_pass http://localhost:8001;
}
}

0 comments on commit 5a7b330

Please sign in to comment.