vite_ts_auto/docker/nginx.conf

27 lines
494 B
Nginx Configuration File
Raw Normal View History

2024-05-08 13:43:24 +08:00
server {
listen 80;
listen [::]:80;
server_name localhost;
location / {
root /etc/nginx/html;
index index.html index.htm;
try_files $uri /index.html;
}
# 后端跨域请求
location ~/api/ {
proxy_pass http://192.168.3.98:1001;
}
# mock 跨域
location ~/mock/ {
proxy_pass http://192.168.3.98:1001;
}
error_page 404 404.html;
location = /50x.html {
root html;
}
}