SSL 設定網域名稱訪問

來源:互聯網
上載者:User

標籤:https ssl

為網域名稱 https.ssl.com 設定https 加密訪問過程:命令如下:#openssl genrsa -des3 -out https.ssl.com.key 1024#openssl req -new -key https.ssl.com.key -out https.ssl.com.csr#openssl rsa -in https.ssl.com.key -out https.ssl.com_nopass.key#openssl -req -new -x509 -days 3650 -key https.ssl.com_nopass.key -out https.ssl.com.crt[[email protected] key]# openssl genrsa -des3 -out https.ssl.com.key 1024Generating RSA private key, 1024 bit long modulus........++++++............++++++e is 65537 (0x10001)Enter pass phrase for https.ssl.com.key:輸入密碼Verifying - Enter pass phrase for https.ssl.com.key:重複輸入密碼[[email protected] key]# openssl req -new -key https.ssl.com.key -out https.ssl.com.csrEnter pass phrase for https.ssl.com.key:輸入前面設定的密碼You are about to be asked to enter information that will be incorporatedinto your certificate request.What you are about to enter is what is called a Distinguished Name or a DN.There are quite a few fields but you can leave some blankFor some fields there will be a default value,If you enter ‘.‘, the field will be left blank.-----Country Name (2 letter code) [XX]:CNState or Province Name (full name) []:Shanghai    Locality Name (eg, city) [Default City]:ShanghaiOrganization Name (eg, company) [Default Company Ltd]:https.ssl.comOrganizational Unit Name (eg, section) []:https.ssl.comCommon Name (eg, your name or your server‘s hostname) []:*.https.ssl.com      Email Address []:[email protected]Please enter the following ‘extra‘ attributesto be sent with your certificate requestA challenge password []:直接斷行符號An optional company name []:直接斷行符號[[email protected] key]# openssl rsa -in https.ssl.com.key -out https.ssl.com_nopass.keyEnter pass phrase for https.ssl.com.key:輸入密碼writing RSA key            [[email protected] key]# openssl req -new -x509 -days 3650 -key https.ssl.com_nopass.key -out https.ssl.com.crt You are about to be asked to enter information that will be incorporatedinto your certificate request.What you are about to enter is what is called a Distinguished Name or a DN.There are quite a few fields but you can leave some blankFor some fields there will be a default value,If you enter ‘.‘, the field will be left blank.-----Country Name (2 letter code) [XX]:CNState or Province Name (full name) []:ShanghaiLocality Name (eg, city) [Default City]:ShanghaiOrganization Name (eg, company) [Default Company Ltd]:https.ssl.comOrganizational Unit Name (eg, section) []:https.ssl.comCommon Name (eg, your name or your server‘s hostname) []:*.https.ssl.comEmail Address []:[email protected][[email protected] key]#設定檔中server {  listen 80;  listen 443;  server_name https.ssl.com;  ssl on;  ssl_certificate ./https.ssl.com.crt;  ssl_certificate_key ./https.ssl.com_nopass.key;  ssl_protocols       SSLv3 TLSv1 TLSv1.1 TLSv1.2;    index index.html index-test.php;  ....  }    既可以https訪問此網域名稱。。


本文出自 “好記性不如爛筆頭” 部落格,請務必保留此出處http://cobweb.blog.51cto.com/390607/1591521

SSL 設定網域名稱訪問

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.