1、出现此种错误的原因有可能是所有者对目录没有写的权限,此时可用chmod 777 目录名 先完全放开权限,如果问题解决,则在慢慢缩小访问权限。

解决办法:chown -R nginx_user:nginx_user /htdocs

2、未设置index的类型,解决办法在nginx.conf中的index后面加上要访问的文件类型,例如:index index.shtml index.html index.htm;
location / {
root html;
index index.html index.htm ;
}

相关文章:

  • 2022-01-15
  • 2022-12-23
  • 2021-10-02
  • 2022-03-08
  • 2021-08-26
  • 2021-06-18
  • 2021-11-25
  • 2021-12-18
猜你喜欢
  • 2021-08-14
  • 2022-01-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案