vue_ts_large_scale/docker/nginx.conf

27 lines
493 B
Nginx Configuration File
Raw Normal View History

2024-02-27 16:51:17 +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;
}
2024-02-28 19:26:42 +08:00
# mock 跨域
location ~/api/ {
proxy_pass http://192.168.3.98:1001;
}
2024-02-27 16:51:17 +08:00
error_page 404 404.html;
location = /50x.html {
root html;
}
}