auth-web/docker/nginx.conf

32 lines
722 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 {
2024-10-27 22:31:52 +08:00
listen 80 ;
listen [::]:80;
server_name localhost;
2024-09-26 09:38:02 +08:00
2024-10-27 22:31:52 +08:00
location / {
root /etc/nginx/html;
index index.html index.htm;
try_files $uri /index.html;
}
2024-09-26 09:38:02 +08:00
2024-10-27 22:31:52 +08:00
# 后端跨域请求
location ~/admin/ {
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
2024-10-27 22:31:52 +08:00
error_page 404 404.html;
2024-09-26 09:38:02 +08:00
2024-10-27 22:31:52 +08:00
location = /50x.html {
root html;
}
}