如果在 CentOS 伺服器中找不到 ssl.conf 檔案怎麼辦?

如果在 CentOS 伺服器中找不到 ssl.conf 檔案怎麼辦?

我正在準備一台新的 CentOS Linux 伺服器,這是眾多伺服器之一。當我嘗試在此伺服器上配置 SSL 時,我注意到沒有ssl.conf檔案。不在/etc/httpd/conf.d/ssl.conf,也不在/etc/httpd/conf/ssl.conf

我也嘗試過locate ssl.conf,沒有結果。

我需要自己創建嗎?我可以從我擁有的其他 CentOS 伺服器複製該檔案嗎?這樣做可以嗎?

Centos 6.3(64 位元)、Apache/2.2.15 (CentOS)、PHP 版本 5.3.3、MySQLi 5.1.73

答案1

您需要安裝mod_ssl.跑步:

sudo yum install mod_ssl

它會將預設設定檔放置在/etc/httpd/conf.d/ssl.conf.

如果您因為某些原因已mod_ssl安裝,但檔案不存在且 yum 提示Nothing to do,請嘗試使用下列命令重新安裝:

sudo yum reinstall mod_ssl

相關內容