配置好虚拟主机之后进行访问,出现如下错误:
错误代码:
Internal Server ErrorThe server encountered an internal error or misconfiguration and was unable to complete your request.Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.More information about this error may be available in the server error log.
对于该错误网上有不同的说法,仅把我解决的方法贴出来供大家参考。
思路:首先应该去看日志,根据错误日志才好对症下药。
言归正传:我的是Linux下的环境,使用命令vi /var/log/httpd/error_log
查看apache的错误日志,在文件的最下方找到了如下记录:
[Fri Jun 05 10:40:43 2015] [crit] [client 192.168.2.169] configuration error: couldn't perform authentication. AuthType not set!: /[Fri Jun 05 10:40:43 2015] [crit] [client 192.168.2.169] configuration error: couldn't perform authentication. AuthType not set!: /favicon.ico, referer: http://vip.mycihi.cn/
如图所示:
根据错误日志所示去网上找了下,解决我问题的方法是:
修改/usr/local/apache/conf/httpd.conf中站点的根目录
AllowOverride All
Satisfy Any
详细信息如下:
<Directory /> Options FollowSymLinks# AllowOverride None AllowOverride All Order deny,allow# Deny from all#Satisfy allSatisfy Any</Directory>
欧克,再次访问就正常了。