nginx配置调整

This commit is contained in:
akun 2024-04-09 10:49:14 +08:00
parent 6dff4049f1
commit ea8225fee4

View File

@ -18,19 +18,22 @@ http {
server_name localhost;
charset utf-8;
#access_log logs/host.access.log main;
location / {
root html;
try_files $uri $uri/ @router;
index index.html index.htm;
}
location @router {
rewrite ^.*$ /index.html last;
}
location /stage-api/ {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:22009/;
proxy_pass http://192.168.1.23:22009/;
}
error_page 500 502 503 504 /50x.html;