Apache 2.4.7 14.04.1(服务器)htacces问题500错误

Apache 2.4.7 14.04.1(服务器)htacces问题500错误

在 do-release-upgrade 之后,Apache 从 2.2.22 更新到 2.4.7。此升级出错。第一个 php5 无法工作,但这个问题已修复。

现在,当网站上有 .htaccess 文件时,我遇到了问题。然后我收到以下错误:

500 Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [no address given] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

当我查看错误日志时,我得到:

[core:alert] [pid 24367] [client 192.168.1.1:61274] /webhosting/mywebsite/.htaccess: ErrorDocument not allowed here

而且,对于您通常放入.htaccess网站文件中的几乎所有内容,我都会收到类似的错误消息。当我将 htaccess 文件中的内容移到两者之间时,<directory></directory>网站就可以正常工作。因此,实际上这意味着它.htaccess是无用的。

有办法解决这个问题吗?

答案1

谢谢您的回复,很抱歉我回复迟了。

我找不到AllowOverride 无在配置中。但是,您的建议让我尝试通过将代码从“none”反转为“all”来执行以下操作:

< 目录 "/webhosting/mywebsite/" > AllowOverride all </Directory >

并且效果很好!

诚挚的问候,Kevenx

相关内容