【问题标题】:Why is apache enforcing SSL (https)? How to undo this?为什么 apache 强制执行 SSL (https)?如何撤消此操作?
【发布时间】:2021-04-13 02:09:39
【问题描述】:

多年来,我们一直在运行多主机 apache2 环境。突然之间,apache 似乎不需要 https。

一些琐碎的网站在端口 80 上没有证书(并且在端口 443 上使用自签名或 let's-encrypt 证书)。

由于最近自动更新 let's-encrypt 证书,我收到一条错误消息,与通过 http 检索 acme-challenge 的问题有关。

好像和最近Debian 4.19.x下apache2默认配置的变化有关。

但是我在 apache2 中没有找到任何选项来撤消 SSL 的强制执行。

这是我对各个虚拟主机的配置(另一个主机也存在问题):

<VirtualHost *:80 >

    ServerName www.antXXX.XX
    ServerAlias antXXX.XX *.antXXX.XX
    ServerAdmin webmaster@...

    DocumentRoot /data/www/htdocsantXXX

    ErrorDocument 503 /ausserBetrieb.html

    <Directory /data/www/htdocsantXXX>
            Options FollowSymLinks MultiViews
            <RequireAll>
                    require all granted
            </RequireAll>

            RedirectMatch ^/$ /index.html
    </Directory>

    ErrorLog /var/log/apache2/antXXX/errorantXXX.log

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

    CustomLog /var/log/apache2/antXXX/accessantXXX.log combined

    ServerSignature On
  </VirtualHost>

  <VirtualHost *:443>
        ServerName www.antXXX.XX
        ServerAlias antXXX.XX *.antXXX.XX
        ServerAdmin webmaster@...

        DocumentRoot /data/www/htdocsantXXX
     ...
  </VirtualHost>

我无法在 apache 的基本配置中找到相应的选项,也找不到包含“此站点配置为需要 SSL (https) 连接...”的 HTML 文本的错误文档。

我知道有 http 选项 Upgrade-Insecure-Requests: 1 。但是,当使用 curl -v http://www.antXXX.XX 在本地检索 Web 文档时,问题也存在。

我如何撤消各个虚拟主机的 https 要求?

感谢您的支持

华伦斯坦

【问题讨论】:

    标签: ssl https apache2 vhosts


    【解决方案1】:

    哦,对不起。终于找到罪魁祸首了。

    我最近在 authn-yubikey 模块中尝试了 yubikey 授权。 它的激活似乎强制执行 https。至少我通过字符串命令找到了相应的 HTML 代码。

    禁用此模块后,http-access 再次可用。

    华伦斯坦

    【讨论】:

      猜你喜欢
      • 2015-12-07
      • 1970-01-01
      • 2012-07-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多