配置ssl證書 Apache配置SSL證書指引

2021-10-14 17:11:02 字數 1305 閱讀 1794

1) 使用yum安裝apache

# yum install httpd -y
2) 修改測試頁面

# vim /var/www/html/index.heml
ps:修改為測試內容,我這裡修改的是:this is a test page.

3) 啟動服務

# service httpd start
4) 訪問測試

1) 安裝ssl模組

# yum install mod_ssl -y
ps:安裝完成後,會在/etc/httpd/conf.d/下生成乙個ssl.conf配置檔案。

2) 先建乙個目錄用來放ssl證書檔案

# mkdir /etc/httpd/ssl/
3) 上傳證書檔案到ssl目錄下

略。4) 編輯ssl配置檔案

# vim /etc/httpd/conf.d/ssl.conf
5) 修改以下幾行,去掉前面的「#」注釋;

documentroot "/var/www/html"  #網頁檔案路徑servername 網域名稱:443  #改為自己的網域名稱sslengine on  #啟用ssl功能sslcertificatefile   /etc/httpd/ssl/2_www.**.cn.crt   #填寫證書檔案路徑sslcertificatekeyfile   /etc/httpd/ssl/3_www.***.cn.key  #填寫私鑰檔案路徑sslcertificatechainfile   /etc/httpd/ssl/1_root_bundle.crt  #填寫證書鏈檔案路徑
6) 重啟伺服器

# service httpd restart
7) 測試訪問頁面

8) 查詢證書詳情

ps:1.證書安裝成功後,訪問必須使用申請證書的網域名稱;

2.顯示小鎖標誌,表示證書安裝成功;

apache 配置ssl服務 證書

lz今天配置了一整天,看著官方教程來各種錯誤。連apache都啟動不了 1 各種埠占用 2 無名錯誤。其實按著官方文件來就差不多了,要懂得看錯誤,這裡附上官方文件 接下來開始配置 1.啟動apache命令 systemctl start httpd.service 注意不是 service http...

Apache的SSL證書的安裝配置

1.openssl 的apache,並進行安裝。apache 版本如 2.配置 apache 下httpd.conf 檔案。loadmodule ssl module modules mod ssl.so 刪除行首的配置語句注釋符號 3.修改 apache 下httpd ssl 檔案。1 開啟 ap...

Apache配置SSL證書實現加密訪問

首先,確保你的apache編譯了ssl模組,這是支援ssl證書必要的條件 如果沒有,請編譯,開啟phpstudy 其他選項選單 php擴充套件 php openssl 前面勾選上 開啟 apache 安裝目錄下 conf 目錄中的 httpd.conf 檔案,找到以下內容並去掉前面的 注釋符,使得s...