【问题标题】:apache - error 400 in domain Debian 8apache - 域 Debian 8 中的错误 400
【发布时间】:2017-08-08 11:46:33
【问题描述】:

我在 debian 8 中使用 apache 2.4 时遇到问题。我在 apache 中使用虚拟主机和假域(example.42)。当我执行example.42.conf文件并将其启用到a2ensite example.42时,当我进入浏览器时,我错过了一个错误400:Bad request,你知道为什么会这样吗?

域正确地指向了 apache(我已经做了 ping 并且一切都很好)。有人告诉我这是 apache 问题,这是错误配置的虚拟主机。我已经尝试了所有设置,但它并没有消除错误。

文件虚拟主机:

<VirtualHost *:80> 
ServerName example.42 
ServerAdmin webmaster@example.42 
DocumentRoot /var/www/html 
ErrorLog ${APACHE_LOG_DIR}/error.log 
CustomLog ${APACHE_LOG_DIR}/access.log combined 
</VirtualHost>

【问题讨论】:

  • 你试过“apachectl configtest”吗?
  • 是的,什么都没有
  • 您可以在此处添加您的虚拟主机或 apache 日志吗? :)
  • 准备好了,虚拟主机文件
  • 我在这里没有看到任何错误。请尝试清除缓存、cookie、dns 缓存,重新启动 apache。如果没有,请阅读 error.log 和 apache 日志,我想这里会有很多有用的信息

标签: apache dns debian virtualhost


【解决方案1】:

问题是域“.42”,因为apache有http头设置,而“.42”域对验证https://httpd.apache.org/security/vulnerabilities_24.html无效(CVE-2016-8743)

可能的解决方案(不建议系统管理员使用): 通过 HttpProtocolOptions Unsafe

更改 HttpProtocolOptions Strict 变量

检查:http://httpd.apache.org/docs/2.4/en/mod/core.html#HttpProtocolOptions

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多