JM-admin/.docker-compose/nginx/conf.d/my.conf

27 lines
821 B
Plaintext
Raw Normal View History

2023-01-10 11:52:47 +08:00
server {
listen 8080;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /usr/share/nginx/html;
add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
try_files $uri $uri/ /index.html;
}
location /api {
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;
rewrite ^/api/(.*)$ /$1 break; #重写
2023-04-23 14:56:03 +08:00
proxy_pass http://118.31.78.83:32399; # 设置代理服务器的协议和地址
2023-01-10 11:52:47 +08:00
}
location /api/swagger/index.html {
2023-04-23 14:56:03 +08:00
proxy_pass http://118.31.78.83:32399/swagger/index.html;
2023-01-10 11:52:47 +08:00
}
2023-04-23 14:56:03 +08:00
}