我是靠谱客的博主 受伤苗条,这篇文章主要介绍nginx作为反向代理访问静态资源报404错以及nginx: [error] OpenEvent("Global\ngx_reload_5744") failed (2: The sys,现在分享给大家,希望可以做个参考。
系统是win10
相关.conf的配置如下,感觉没问题,但nginx一直报404
server{
listen 80;
autoindex off;
server_name wanghz.com;
access_log d:access.log combined;
index index.html index.htm index.jsp index.php;
#error_page 404 /404.html;
if ( $query_string ~* ".*[;'<>].*" ){
return 404;
}
location ~ /(mmall_fe|mmall_admin_fe)/dist/view/* {
deny all;
}
location / {
root D:FTPServerftpfileimg;
add_header Access-control_Allow_Origin *;
}
}
后来发现在任务管理器中结束nginx运行,并且双击nginx.exe重启(一定要有这一步),再在命令行运行nginx.exe -t 和nginx.exe -s reload才不会报错,然后在浏览器地址栏输入就可以正常访问了
最后
以上就是受伤苗条最近收集整理的关于nginx作为反向代理访问静态资源报404错以及nginx: [error] OpenEvent("Global\ngx_reload_5744") failed (2: The sys的全部内容,更多相关nginx作为反向代理访问静态资源报404错以及nginx:内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复