lnmp部署知乎出现403

查看错误日志:

  [root@web01 /]# tailf  /var/log/nginx/error.log

  2019/01/16 19:02:06 [error] 10023#10023: *8 open() "/code/zh/WeCenter_3-2-1/favicon.ico" failed (1o HTTP/1.1", host: "zh.lvhanzhi.com", referrer: "http://zh.lvhanzhi.com/"

查看放知乎的目录:

  [root@web01 zh]# ll
  total 8256
  drwxrwxr-x 3 www www 52 Jun 4 2018 __MACOSX
  drwx------ 14 www www 296 Jun 4 2018 WeCenter_3-2-1
  -rw-r--r-- 1 www www 8451194 Jan 15 11:15 WeCenter_3-2-1.zip

找到原因:权限不够

解决方法:设置权限

  [root@web01 zh]# chmod 755 WeCenter_3-2-1

原文地址:https://www.cnblogs.com/lvhanzhi/p/10278885.html