Steve/EV Dashboard/nginx 도커파일 및 설정파일 추가
This commit is contained in:
89
nginx/s1.byunc.com.conf
Normal file
89
nginx/s1.byunc.com.conf
Normal file
@@ -0,0 +1,89 @@
|
||||
server {
|
||||
#listen [::]:80;
|
||||
#root /var/www/html/mysite.com;
|
||||
index index.php index.html index.htm;
|
||||
server_name s1.byunc.com;
|
||||
|
||||
#error_log /var/log/nginx/mysite.com_error.log;
|
||||
#access_log /var/log/nginx/mysite.com_access.log;
|
||||
|
||||
client_max_body_size 16G;
|
||||
|
||||
location = / {
|
||||
return 302 /steve/;
|
||||
}
|
||||
|
||||
location /steve {
|
||||
proxy_pass http://192.168.0.126:8180;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
|
||||
# ── FastAPI 대시보드 + API ──
|
||||
location = /dashboard {
|
||||
proxy_pass http://192.168.0.126:8000;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://192.168.0.126:8000;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
location /health {
|
||||
proxy_pass http://192.168.0.126:8000;
|
||||
}
|
||||
|
||||
# WebSocket 전용 설정 (핵심)
|
||||
location /steve/websocket {
|
||||
proxy_pass http://192.168.0.126:8180;
|
||||
|
||||
# WebSocket 업그레이드 헤더
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
|
||||
# WebSocket 타임아웃 (충전 중 끊기지 않게)
|
||||
proxy_read_timeout 86400s;
|
||||
proxy_send_timeout 86400s;
|
||||
proxy_connect_timeout 86400s;
|
||||
}
|
||||
location / {
|
||||
proxy_pass http://192.168.0.126:8180;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_redirect off;
|
||||
proxy_buffering off;
|
||||
proxy_read_timeout 86400s;
|
||||
proxy_send_timeout 86400s;
|
||||
proxy_connect_timeout 86400s;
|
||||
}
|
||||
listen 443 ssl; # managed by Certbot
|
||||
ssl_certificate /etc/letsencrypt/live/s1.byunc.com/fullchain.pem; # managed by Certbot
|
||||
ssl_certificate_key /etc/letsencrypt/live/s1.byunc.com/privkey.pem; # managed by Certbot
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
||||
|
||||
}
|
||||
server {
|
||||
if ($host = s1.byunc.com) {
|
||||
return 301 https://$host$request_uri;
|
||||
} # managed by Certbot
|
||||
|
||||
|
||||
server_name s1.byunc.com;
|
||||
listen 80;
|
||||
return 404; # managed by Certbot
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user