./nginx -s reload 报错
来源:11-5 nginx和域名的配置

悟空工作室
2019-03-26
配置文件如下:
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回答
-
proxy_pass对应后面的/去掉试试
012019-03-27
相似问题