nginx 403错误

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 ;
}
posted @ 2016-04-27 22:59  巫谢  阅读(211)  评论(0编辑  收藏  举报