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-12-23
  • 2021-07-19
  • 2021-08-14
  • 2021-05-29
  • 2022-12-23
  • 2022-12-23
  • 2022-01-16
  • 2021-08-14
猜你喜欢
  • 2021-06-29
  • 2021-08-24
  • 2022-12-23
  • 2022-12-23
  • 2021-04-10
  • 2021-09-12
相关资源
相似解决方案