2013-05-07 118 views
-1

我在我的Mac中安装了MAMP 2.1.1,并且直到现在我都使用这个没有问题。此刻,我创建了一个虚拟主机,并且已将localhost.myproject添加到/ etc/hosts文件。适当由于apache配置MAMP不启动

NameVirtualHost *:80 

<VirtualHost *:80> 
    ServerAdmin [email protected] 
    DocumentRoot "/Applications/MAMP/htdocs/myproject/web" 
    ServerName localhost.myproject 
    ErrorLog "logs/myproject-error_log" 
    CustomLog "logs/myproject-access_log" common 
    <Directory "/Applications/MAMP/htdocs/myproject/web"> 
     Options Indexes FollowSymLinks MultiViews 
     AllowOverride All 
     #Order allow, deny 
     Allow from All 
    </Directory> 
</VirtualHost> 

有了MAMP的这种配置Apache服务器启动和日志文件显示:我已经修改了文件/Applications/MAMP/conf/apache/extra/httpd-vhosts.conf下一个内容

[Tue May 07 09:37:02 2013] [notice] Digest: generating secret for digest authentication ... 
[Tue May 07 09:37:02 2013] [notice] Digest: done 
[Tue May 07 09:37:02 2013] [notice] Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/0.9.8r DAV/2 PHP/5.4.4 configured -- resuming normal operations 

,但如果我取消对该行

#Order allow, deny 

,我尝试重新启动服务器,Apache不启动,当我看日志文件,没有行添加到该文件。

有人可以帮助我吗?

在此先感谢。

回答

0

经过几个小时寻找互联网上的信息,我意识到一个空白是导致问题的线路。我写道:

Order allow,deny 

我重新启动服务器,它的工作完美。