2013-05-07 63 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 

我重新啓動服務器,它的工作完美。