【发布时间】:2012-12-06 17:23:20
【问题描述】:
我已经在互联网上不停地搜索了三天以找到解决问题的方法,但没有任何效果。
我的 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>
【问题讨论】:
-
老兄,几乎没有你可以发给我的链接我没有关注。
-
也许尝试将 AllowOverride AuthConfig Limit 更改为 AllowOverride All(在 James.conf 中)。此外,您尝试打开的文件必须位于名为 Sites 的文件夹内的主目录中。假设您在那里有一个名为 PHP 的文件夹,其中包含一个 index.php。要访问它,您可以在浏览器中访问localhost/~James/PHP/index.php。此首选项窗格应允许您打开/关闭服务器 - clickontyler.com/blog/2012/02/web-sharing-mountain-lion
-
对 James.conf 的更改不起作用,首选项窗格已损坏。打开 Web 共享只会更改开关的状态。红灯仍然显示,并且无论 UISwitch 的状态如何,都会显示“Web 共享已关闭”。
标签: apache osx-mountain-lion httpd.conf