阅读:1374回复:0
二级目录代理如何方便的设置
我内网有个应用url是 http://localhost:8069 但是打开的话他还会跳转一次到 http://localhost:8069/web
我用ank配置了一个www主业然后修改如下: server { listen *:80; server_name www.aaa.com ; root "C:/UPUPW_ANK_W64/WebRoot//www"; index index.html index.htm index.php default.php app.php u.php; autoindex off; sub_filter 'http://$host:443' '$scheme://$host'; sub_filter 'http:\/\/$host:443' '$scheme://$host'; sub_filter 'http://$host:8011' '$scheme://$host'; sub_filter 'http://$host:8033' '$scheme://$host'; sub_filter 'http://$host:80' '$scheme://$host'; sub_filter_once off; sub_filter_types text/css text/xml text/plain application/json application/javascript application/xml application/rss+xml application/xhtml+xml; location ~ /\.(htaccess|uini)$ { deny all; } location /crm { #DemoBackend1后面的斜杠是一个关键,没有斜杠的话就会传递service到后端节点导致404 proxy_pass http://localhost:8069/; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } location ~ \.php$ { proxy_pass http://bakend_php; include uproxy.conf; } try_files $uri @proxy; location @proxy { internal; proxy_pass http://bakend_php; include uproxy.conf; } } 结果能跳转后出现404,如何解决啊: 图片:微信截图_20180831092830.png |
|