天天看點

linux 中建立HTTPS通路

<b>linux-https</b>

<b>      </b>  (1)建立存放證書的目錄

            mkdir /etc/httpd/.ssl

            cd /etc/httpd/.ssl

         (2)建立私鑰檔案

            openrsa genrsa -out server.key 1024

         (3)建立網站證書

            openssl req -new -x509 -key server.key -out server.crt

         (4)利用apache建立虛拟主機進行測試

            mkdir /1

            touch /1/index.html

            echo "this is home page's"&gt;/1/index.html

        (5)在虛拟主機中加入:

            sslengine on  -------------   (開啟ssl)

            sslcertificatefile /etc/http/.ssl/server.crt---(指定證書檔案)

            sslcertificatekeyfile /etc/http/.ssl/server.key--(指定私鑰檔案)

繼續閱讀