|
@@ -8,19 +8,17 @@ server {
|
|
|
root $root;
|
|
root $root;
|
|
|
location / {
|
|
location / {
|
|
|
index index.html index.htm;
|
|
index index.html index.htm;
|
|
|
- try_files $uri $uri/ /gis/index.html;
|
|
|
|
|
add_header Access-Control-Allow-Origin *;
|
|
add_header Access-Control-Allow-Origin *;
|
|
|
- autoindex off; #开启nginx目录浏览功能
|
|
|
|
|
- autoindex_exact_size off; #文件大小从KB开始显示
|
|
|
|
|
- autoindex_localtime on; #显示文件修改时间为服务器本地时间
|
|
|
|
|
|
|
+ try_files $uri $uri/ @router;
|
|
|
|
|
+ }
|
|
|
|
|
+ location @router {
|
|
|
|
|
+ rewrite ^.*$ /index.html last;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- location /api {
|
|
|
|
|
- proxy_pass http://admin:2021/api;
|
|
|
|
|
|
|
+ location /api/ {
|
|
|
|
|
+ proxy_pass http://admin:2021/;
|
|
|
proxy_read_timeout 300s;
|
|
proxy_read_timeout 300s;
|
|
|
- proxy_set_header Host railway.iamsee.com;
|
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
- # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
|
proxy_set_header x-forwarded-for $remote_addr;
|
|
proxy_set_header x-forwarded-for $remote_addr;
|
|
|
proxy_set_header REMOTE-HOST $remote_addr;
|
|
proxy_set_header REMOTE-HOST $remote_addr;
|
|
|
|
|
|