【问题标题】:Apache authentification errorApache 身份验证错误
【发布时间】:2014-07-16 05:36:11
【问题描述】:

我已经在基于 Debian 的发行版(内核 3.2.0-27)和 apache2.2-common 软件包上安装了 Apache 2.2,并使用默认配置。

尝试运行简单的脚本 info.php 我在 /var/log/apache2/error.log 中发现了错误:

[Wed Jul 16 09:17:08 2014] [crit] [client 127.0.0.1] configuration error:  couldn't perform authentication. AuthType not set!: /info.php

我在互联网上搜索了几个小时,但没有找到解决方案。

脚本信息.php:

<?php
phpinfo();
?>

配置文件:

/etc/apache2/apache2.conf:

...
Include httpd.conf
Include ports.conf
Include conf.d/
Include sites-enabled/
...

/etc/apache2/httpd.conf 很清楚。

/etc/apache2/ports.conf:

...
NameVirtualHost *:80
Listen 80
...

/etc/apache2/conf.d/security:

...
ServerSignature On
TraceEnable Off
...

/etc/apache2/sites-enabled/@000-default (链接到 /etc/apache2/sites-available/default):

<VirtualHost *:80>
        ServerAdmin webmaster@localhost

        DocumentRoot /var/www
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

已加载模块列表(由apache2ctl -M获取):

apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
Loaded Modules:
 core_module (static)
 authn_file_module (static)
 authn_default_module (static)
 authz_default_module (static)
 log_config_module (static)
 logio_module (static)
 mpm_prefork_module (static)
 http_module (static)
 so_module (static)
 alias_module (shared)
 authz_groupfile_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 cgi_module (shared)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 mime_module (shared)
 negotiation_module (shared)
 reqtimeout_module (shared)
 setenvif_module (shared)
 status_module (shared)
Syntax OK

我应该进行哪些更改才能使服务器正常工作?

【问题讨论】:

    标签: php linux apache2.2 debian-based


    【解决方案1】:

    看起来你可能没有加载 php mod。在 httpd.conf 中取消注释或添加“LoadModule php5_module path/to/the/file/libphp5.so”行,obv 放入实际文件路径

    【讨论】:

      【解决方案2】:

      对不起,伙计们,我发现我不是使用原始 Apache,而是使用其自定义构建,其中禁用了未经授权的工作。感谢您的 cmets。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-12-02
        • 2018-06-19
        • 2012-10-18
        相关资源
        最近更新 更多