Nginx第一坑!!解决明明正常配置了,非80端口可以正常跳转项目页面,80端口却只会显示Welcome to nginx!的问题

网上看了很多问答,很多人说是windows默认占用了80端口,但是如果默认占用了80端口怎么还会显示Welcome to nginx!

 我的解决方案是因为我的nginx.conf配置文件里面的location没有写index  index.html index.htm;导致项目无法实现重定向。最后贴出我的location

location / {
	    ...
	    index  index.html index.htm;
}

重启nginx.

nginx -s reload

就可以正常跳转了,以上仅是本人的解决方案,只适用了本人遇到的这个问题。

发布了10 篇原创文章 · 获赞 0 · 访问量 3684

猜你喜欢

转载自blog.csdn.net/qq_26891571/article/details/104645826