我已经在互联网上搜索了三天,找不到我的问题,但没有任何工作。
我的Apache已加载,我的httpd.conf文件是默认的,而不是PHP5 LoadModule,现在已取消注释,并且至少允许读取所有文件的权限。
我已经完成了对Mountain Lion的彻底清理重新安装,只使用Time Machine恢复了我的用户帐户。
以下是我的httpd.conf文件的一些重要部分(因为它们是默认的):
ServerRoot "/usr"
#Listen 12.34.56.78:80
Listen 80
User _www
Group _www
#ServerName www.example.com:80
DocumentRoot "/Library/WebServer/Documents"
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
<Directory "/Library/WebServer/Documents">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
我的 UserName.conf 文件( James.conf ):
<Directory "/Users/James/Sites/">
Options Indexes MultiViews
AllowOverride AuthConfig Limit
Order allow,deny
Allow from all
</Directory>
答案 0 :(得分:1)
不幸的是,在完全重新安装Mountain Lion后,我仍然无法成功启动Apache。我甚至从clickontyler.com/blog/2012/02/web-sharing-mountain-lion下载了用于Web共享的系统首选项窗格,但这仍然无效。
唯一允许我在Macbook Pro上利用Apache服务器的方法是从here下载XAMPP。
答案 1 :(得分:0)
检查此文件
/private/etc/apache2/extra/httpd-vhosts.conf*
我注释掉虚拟虚拟主管
我也在httpd.conf中输入了一个拼写错误,当我修复了事情开始工作时