Mac上的Apache问题"您无权访问/在此服务器上访问#34;

时间:2017-10-12 15:22:38

标签: apache httpd.conf

我在Apache上遇到以下问题,我试图在本地加载网站,但是我收到了Forbidden错误。

这是我的配置:

/etc/hosts

127.0.0.1       nop33.local

/etc/apache2/httpd.conf

Listen 80

<Directory />
    Order allow,deny
    Require all granted
#    AllowOverride none
#    Require all denied
</Directory>

DocumentRoot "/Users/nop33/dev"
<Directory "/Users/nop33/dev">
    Options FollowSymLinks Multiviews
    MultiviewsMatch Any
    AllowOverride None
    Require all granted
</Directory>

ErrorLog "/private/var/log/apache2/error_log"

/etc/apache2/extra/httpd-vhosts.conf

NameVirtualHost *:80

<VirtualHost *:80>
    ServerAdmin nop33@example.com
    DocumentRoot /Users/nop33/dev/project-name/public
    ServerName nop33.local
    <Directory /Users/nop33/dev/project-name/public>
      Order allow,deny
      Require all granted
    </Directory>
</VirtualHost>

0 个答案:

没有答案