Apache localhost 403 error with Yosemite

后端 未结 7 2008
旧巷少年郎
旧巷少年郎 2021-01-30 01:37

I\'ve just installed Mac OS X Yosemite fresh. I configured Apache and chmodded \"users/user/Sites\" to 755. When I hit localhost I receive a 403 Forbidden \"You don\'t hav

7条回答
  •  孤街浪徒
    2021-01-30 02:01

    Suggestions might focus on your own user specific conf in apache but by default this configuration might not be loaded at all.

    Edit the userdir module configuration:

    sudo vi /etc/apache2/extra/httpd-userdir.conf

    Uncomment the include of the user directory configuration files:

    Include /private/etc/apache2/users/*.conf

    Make sure you have a user directory configuration according our own username:

    sudo vi /etc/apache2/users/.conf

    Make sure you have good configuration for your home directory:

    DocumentRoot "/Users//Sites/" /Sites/"> AllowOverride All Options Indexes MultiViews FollowSymLinks Require all granted

    Restart apache (webserver)

    sudo apachectl restart

    Check your site!

提交回复
热议问题