auth-web/docker/nginx.conf

32 lines
708 B
Nginx Configuration File
Raw Normal View History

2024-09-26 09:38:02 +08:00
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
listen [::]:80;
server_name localhost;
location / {
root /etc/nginx/html;
index index.html index.htm;
try_files $uri /index.html;
}
# 后端跨域请求
location ~/admin/ {
2024-10-18 13:51:03 +08:00
proxy_pass http://172.17.0.1:8000;
proxy_set_header Host $http_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;
2024-09-26 09:38:02 +08:00
}
error_page 404 404.html;
location = /50x.html {
root html;
}
}