【问题标题】:Apache Mountain Lion Not Working阿帕奇山狮不工作
【发布时间】: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


【解决方案1】:

检查这个文件

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

我注释掉了虚拟虚拟主机

我还在 httpd.conf 中犯了一个错字,当我修复它时,事情开始起作用了

【讨论】:

    【解决方案2】:

    不幸的是,在完全干净地重新安装了 Mountain Lion 之后,我仍然无法成功启动 Apache。我什至从 clickontyler.com/blog/2012/02/web-sharing-mountain-lion 下载了用于 Web 共享的系统偏好设置窗格,但仍然无法正常工作。

    唯一能让我在 Macbook Pro 上利用 Apache 服务器的方法是从 here 下载 XAMPP。

    【讨论】:

      猜你喜欢
      • 2012-12-15
      • 2015-04-05
      • 2023-03-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多