Home  >  Q&A  >  body text

php - macbook nginx 403

刚买mac不久 已经配置好环境 nginx php7 mysql

我在nginx下配置了2个站点
root /usr/local/var/www/default;
正常访问

root /Users/yanghaha/Documents/ME/HaAdmin/public;
403

请问怎样解决403问题?

因为IDE不支持读取/usr目录下的东西
所以把代码放到Users下
但放到Users下 就报403了
请问有会解决的吗?

ringa_leeringa_lee2685 days ago361

reply all(2)I'll reply

  • 大家讲道理

    大家讲道理2017-05-16 13:03:03

    chmod -R 777 /Users/yanghaha/Documents/ME/HaAdmi

    reply
    0
  • 習慣沉默

    習慣沉默2017-05-16 13:03:03

    403 is a static access.

    Troubleshoot the following issues:

    1. Is the directory not traversable and there is no default entry file in the public directory? Try writing phpinfo.php and insert it to visit

    2. Is there a directory permission problem? You should use the root account to start nginx

    3. You said you configured two sites, but I don’t know how to configure them, and whether the sites are configured or not. Different sites use different ports. In addition to port 80, you need to use port access; different sites have the same port and need to use domain names to distinguish them

    I happened to have recorded the related configuration process on mac, you can refer to it:

    https://lzw.me/a/mac-osx-php-...

    reply
    0
  • Cancelreply