![cover](https://img-blog.csdnimg.cn/direct/e4641c255bf14df094f1e9b03127d91d.png)
nginx 显示500 rewrite or internal redirection cycle while internally redirecting to “/index.html“
nginx 显示500 rewrite or internal redirection cycle while internally redirecting to "/index.html"
![](https://csdnimg.cn/release/devpress/public/img/ic-book.4f347164.png)
一键AI生成摘要,助你高效阅读
问答
·
问题描述
在nginx上部署vue项目,访问页面显示500
原因分析:
查看nginx错误日志,显示:rewrite or internal redirection cycle while internally redirecting to "/index.html", client: xxx.xxx..xxx.145, server: localhost, request: "GET /favicon.ico HTTP/1.0", host: "xxx.xxx..xxx.145:8080", referrer: "http://xxx.xxx..xxx.145/"
原因可能有两个:
- 找不到文件路径
- 文件路径没有访问权限
解决方案:
依据路径能找到部署文件,那就是访问权限问题。
nginx.conf
文件中user一行,原来是 user nginx
改为 user root
,即可访问页面。
更多推荐
所有评论(0)