Apache將無法啓動,錯誤...Apache將無法啓動後生成自簽名證書
1:08:52 a.m. [Apache] Error: Apache shutdown unexpectedly.
1:08:52 a.m. [Apache] This may be due to a blocked port, missing dependencies,
1:08:52 a.m. [Apache] improper privileges, a crash, or a shutdown by another method.
1:08:52 a.m. [Apache] Press the Logs button to view error logs and check
1:08:52 a.m. [Apache] the Windows Event Viewer for more clues
1:08:52 a.m. [Apache] If you need more help, copy and post this
1:08:52 a.m. [Apache] entire log window on the forums
阿帕奇週轉箱之前產生以下these instructions自簽名證書。我還用端口443重定向更新了虛擬主機文件。
Apache日誌不會告訴我任何有用的信息,因爲嘗試啓動Apache時不會生成錯誤。我netstat的檢查,沒有什麼是對443
編輯:我註釋掉
# Secure (SSL/TLS) connections
Include conf/extra/httpd-ssl.conf
所以東西在我的SSL配置是使它無法啓動了服務器再次。據我所知,我已經在SSL配置中正確設置了證書和密鑰文件。
編輯2:運行httpd -t
我得到了錯誤SSLCertificateFile: file 'C:/my/xampp/location/apache/conf/ssl.crt/server.crt' does not exist or is empty
而且果然我創建的CRT文件是空的!密鑰文件不是。我會嘗試重新創建它。
編輯3:好的,我重新創建.crt和密鑰文件,他們都有東西在裏面。 conf語法通過,但Apache不會啓動。我現在可以看到一個錯誤:Certificate and private key www.example.com:443:0 from /conf/ssl.crt/server.crt and /conf/ssl.key/server.key do not match AH00016: Configuration Failed
在建立證書時,我是否必須具有通用名稱,與服務器名稱完全匹配?即如果虛擬主機中的服務器名稱是www.example.com:443,是否必須將端口包含在完全限定的域URL通用名稱中?
編輯4:看到我的配置似乎不錯,現在我嘗試了一個different tutorial和證書似乎確定,但我得到錯誤described here。 openssl x509 -in my.crt -text
表示證書結尾的奇數大小的塊。我無法理解新生成的證書是如何腐敗的。我錯過了什麼嗎?
背景是我試圖建立一個錯誤讓我們加密爲我的Win XAMPP服務器生成一個可移植的SSL證書(我在Ubuntu機器上這樣做,因爲它更容易使用客戶端)。但是,我得到了「Correct zName not found for TLS SNI challenge」。其中一個建議是先有一個自簽名的證書。這使我想以上。
謝爾頓,這就像你告訴我不知道答案。我會說幾個小時的研究和嘗試不同的建議遠不是猜測。這是我第一次試圖實現SSL,對我來說並不那麼容易。 –