请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

./nginx -s reload 报错

配置文件如下:

admin.xxx.com.conf
server {
        listen 80;
        autoindex on;
        server_name admin.xxx.com;
        access_log /usr/local/nginx/logs/access.log combined;
        index index.html index.htm index.jsp index.php;
        #root /devsoft/apache-tomcat-7.0.73/webapps/mmall;
        #error_page 404 /404.html;
        if ( $query_string ~* ".*[\;'\<\>].*" ){
                return 404;
        }
        location = / {
                root /product/frontend/seeshu_manager_fe/dist;
                index index.html;
        }
        location ~ .*\.(html|htm)$ {
                root /product/frontend/seeshu_manager_fe/dist;
                index index.html;
        }
        location ~ .*\.do$ {
                proxy_pass http://127.0.0.1:8080/;
        }
        location / {
                try_files $uri $uri/ /index.html;
        }
}

./nginx -s reload 报错

nginx: [emerg] "proxy_pass" cannot have URI part in location given by regular expression, or inside named location, or inside "if" statement, or inside "limit_except" block in /usr/local/nginx/conf/vhost/admin.xxx.com.conf:21

正在回答

1回答

Rosen 2019-03-27 19:24:23

proxy_pass对应后面的/去掉试试

0 回复 有任何疑惑可以回复我~
  • 提问者 悟空工作室 #1
    非常感谢!
    回复 有任何疑惑可以回复我~ 2019-03-27 21:31:43
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号