[英]Apache authentification error
我已經在基於Debian的distr(內核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
我已經在互聯網上搜索了數小時,但沒有找到解決方法。
腳本info.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 mod。 取消注釋或在httpd.conf中添加“ LoadModule php5_module path / to / the / file / libphp5.so”行,然后輸入實際的文件路徑
抱歉,伙計們,我發現我不是使用原始Apache,而是使用其自定義構建,其中未經授權的工作被禁用。 感謝您的意見。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.