php - macbook nginx 403
ringa_lee
ringa_lee 2017-05-16 13:01:03
0
2
412

I just bought a mac and have configured the environment nginx php7 mysql

I configured 2 sites under nginx
root /usr/local/var/www/default;
Normal access

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

How to solve the 403 problem?

Because the IDE does not support reading things in the /usr directory
So I put the code under Users
But when I put it under Users, it reported 403
Is there any solution?

ringa_lee
ringa_lee

ringa_lee

reply all(2)
大家讲道理

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

習慣沉默

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-...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template