將 Wheezy 升級到 Jessie apache 2 SSL 後停止工作

將 Wheezy 升級到 Jessie apache 2 SSL 後停止工作

我將伺服器從 Wheezy 升級到 Jessie,Apache 2.4 停止工作...

特別是在連接埠 443 上沒有 ssl ....

telnet myhost 443
GET https://myhost
<html><meta http-equiv='Content-Type' content='text/html; charset=utf-8'/><body>Something in /var/www/html/index.html</body></html>>Connection closed by foreign host.

它應該是:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
Reason: You're speaking plain HTTP to an SSL-enabled server port.<br />
 Instead use the HTTPS scheme to access this URL, please.<br />
</p>
</body></html>
Connection closed by foreign host.

SSLEngine 已開啟 - 昨天一切正常,但 Wheezy,而不是 Jessie...

* 更新 * 新想法 - 我發現,與 :443 的連接被記錄到 /var/log/apache2/access.log 而不是 /var/log/apache2-ssl/access.log 但為什麼呢?

答案1

解決方案很難找到......只有巧合才能幫助我找到它。

Apache2.4需要.conf擴充......

我有兩個文件:/etc/apache2/sites-available/http/etc/apache2/sites-available/https當然/etc/apache2/sites-enabled/.

嘗試找出我採取的解決方案default-ssl.conf並將其設為符號鏈接,並且它有效!所以我複製了每一行來查找差異在哪裡,但什麼也沒發現。我將其重命名為httpsinto https.conf,創建了一個符號鏈接,它也有效!

最大的錯誤是我自己創建符號鏈接,而不是使用a2ensite- 這將導致該http站點不存在 - 直到將其重命名為http.conf.

6小時的搜尋什麼也沒找到......嘆氣......但這也許會幫助其他人..

答案2

您讀過 Apache 2.4 的發行說明嗎?

“值得注意的是,訪問控制指令發生了很大變化,需要手動遷移到新指令。”

https://www.debian.org/releases/jessie/amd64/release-notes/ch-information.en.html#apache-httpd-incomat

答案3

我在使用授權配置時遇到了同樣的問題。發現和改變都是延遲的。

    <Directory /var/www/webalizer>
            Options Indexes FollowSymlinks MultiViews
    #       AllowOverride all
    #       Order allow,deny
            Require all granted
    </Directory>

舊的設定是註解(#)。這對你有用嗎?

相關內容