最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Centos 5下配置https服務器的方法

 更新時間:2010年07月04日 23:45:56   作者:  
Centos 5下配置https服務器的步驟,需要的朋友可以參考下。
[root@centos5 ~]# yum -y install mod_ssl 在線安裝mod_ssl
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* base: centos.candishosting.com.cn
* updates: mirror.khlug.org
* addons: centos.candishosting.com.cn
* extras: centos.candishosting.com.cn
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package mod_ssl.i386 1:2.2.3-11.el5_2.centos.4 set to be updated
--> Processing Dependency: libdistcache.so.1 for package: mod_ssl
--> Processing Dependency: libnal.so.1 for package: mod_ssl
--> Running transaction check
---> Package distcache.i386 0:1.4.5-14.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
mod_ssl i386 1:2.2.3-11.el5_2.centos.4 updates

85 k
Installing for dependencies:
distcache i386 1.4.5-14.1 base 119 k

Transaction Summary
=============================================================================
Install 2 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 204 k
Downloading Packages:
(1/2): mod_ssl-2.2.3-11.e 100% |=========================| 85 kB 00:02
(2/2): distcache-1.4.5-14 100% |=========================| 119 kB 00:03
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: distcache ######################### [1/2]
Installing: mod_ssl ######################### [2/2]

Installed: mod_ssl.i386 1:2.2.3-11.el5_2.centos.4
Dependency Installed: distcache.i386 0:1.4.5-14.1
Complete!

[root@centos5 ~]# cd /etc/httpd/conf 進入HTTP服務器配置文件所在目錄
[root@centos5 conf]# rm -rf ssl.*/server.* 刪除默認或殘留的服務器證書相關文件

[root@centos5 ~]# rpm -qa |grep openssl
openssl-0.9.8b-10.el5

[root@centos5 ~]# openssl genrsa -out www.yang.com.key 1024 建立服務器密鑰
Generating RSA private key, 1024 bit long modulus
...........................................................++++++
.++++++
e is 65537 (0x10001)

[root@centos5 ~]# openssl req -new -key www.yang.com.key -out www.yang.com.csr 建立服務器公鑰

You are about to be asked to enter information that will be incorporated
into 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 blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [GB]:OM 輸入國名
State or Province Name (full name) [Berkshire]:fuzhou 輸入省名
Locality Name (eg, city) [Newbury]:fou 輸入城市名
Organization Name (eg, company) [My Company Ltd]:yang 輸入組織名(任意)
Organizational Unit Name (eg, section) []:www 不輸入,直接回車
Common Name (eg, your name or your server's hostname) []:www.yang.com 輸入通稱(任意)
Email Address []:admin@yang.com 輸入電子郵箱地址

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []: 不輸入,直接回車
An optional company name []: 不輸入,直接回車

[root@centos5 ~]# ls -l
total 68
-rw------- 1 root root 986 Jan 31 23:54 anaconda-ks.cfg
drwxr-xr-x 2 root root 4096 Feb 1 02:17 Desktop
-rw-r--r-- 1 root root 0 Feb 1 03:06 Finished
-rw-r--r-- 1 root root 15078 Jan 31 23:54 install.log
-rw-r--r-- 1 root root 2876 Jan 31 23:53 install.log.syslog
-rw-r--r-- 1 root root 0 Feb 1 03:06 Package
-rw-r--r-- 1 root root 0 Feb 1 03:06 Processing
-rw-r--r-- 1 root root 0 Feb 1 03:06 Running
-rw-r--r-- 1 root root 684 Feb 1 04:54 www.yang.com.csr
-rw-r--r-- 1 root root 887 Feb 1 04:52 www.yang.com.key

[root@centos5 ~]# openssl x509 -req -days 365 -in www.yang.com.csr -signkey www.yang.com.key -out www.yang.com.crt 建立服務器證書

Signature ok
subject=/C=OM/ST=fuzhou /L=fou/O=yang/OU=www/CN=www.yang.com/emailAddress=admin@ yang.com
Getting Private key

[root@centos5 ~]# ll
total 72
-rw------- 1 root root 986 Jan 31 23:54 anaconda-ks.cfg
drwxr-xr-x 2 root root 4096 Feb 1 02:17 Desktop
-rw-r--r-- 1 root root 0 Feb 1 03:06 Finished
-rw-r--r-- 1 root root 15078 Jan 31 23:54 install.log
-rw-r--r-- 1 root root 2876 Jan 31 23:53 install.log.syslog
-rw-r--r-- 1 root root 0 Feb 1 03:06 Package
-rw-r--r-- 1 root root 0 Feb 1 03:06 Processing
-rw-r--r-- 1 root root 0 Feb 1 03:06 Running
-rw-r--r-- 1 root root 920 Feb 1 04:57 www.yang.com.crt
-rw-r--r-- 1 root root 684 Feb 1 04:54 www.yang.com.csr
-rw-r--r-- 1 root root 887 Feb 1 04:52 www.yang.com.key


[root@centos5 ~]# vi /etc/httpd/conf.d/ssl.conf 修改SSL的設置文件

# When we also provide SSL we have to listen to the
# the HTTPS port in addition.
#
Listen 443

[root@centos5 ~]# /etc/rc.d/init.d/httpd restart 重啟服務
Stopping httpd: [ OK ]
Starting httpd: [ OK ]

[root@centos5 ~]# netstat -ntpl |grep 443
tcp 0 0 :::443 :::* LIST

EN 10317/httpd



注:本實驗以http://www.centospub.com/make/ssl.html為指導

配置SSL虛擬主機

#vi /etc/httpd/conf/httpd.conf

NameVirtualHost 192.168.0.20:443

NameVirtualHost 192.168.0.20:80
<VirtualHost IP:192.168.0.20:443>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /var/www/html
ServerName www. yang.com

SSLEngine on
SSLCertificateFile /etc/httpd/conf/www.yang.com.crt
SSLCertificateKeyFile /etc/httpd/conf/www.yang.com.key

ErrorLog logs/dummy-www.yang.com-error_log
CustomLog logs/dummy-www.yang.com-access_log common
</VirtualHost>
<VirtualHost 192.168.0.20:443>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /var/www/cgi-bin/openwebmail
ServerName mail.yang.com

SSLEngine on
SSLCertificateFile /etc/httpd/conf/www.yang.com.crt
SSLCertificateKeyFile /etc/httpd/conf/www.yang.com.key

ErrorLog logs/dummy-www.yang.com-error_log
CustomLog logs/dummy-www.yang.com-access_log common
</VirtualHost>


#vi /etc/httpd/conf.d/ssl.conf 添加下面的內容

SSLEngine on
SSLCertificateFile /etc/httpd/conf/www.yang.com.crt
SSLCertificateKeyFile /etc/httpd/conf/www.yang.com.key

相關文章

  • 在Linux環(huán)境下采用壓縮包方式安裝JDK 13的方法

    在Linux環(huán)境下采用壓縮包方式安裝JDK 13的方法

    JDK(Java Development Kit)是Sun公司(后被Oracle收購)推出的面向對象程序設計語言的開發(fā)工具包,擁有這個工具包之后我們就可以使用Java語言進行程序設計和開發(fā)。這篇文章主要介紹了在Linux環(huán)境下采用壓縮包方式安裝JDK 13,需要的朋友可以參考下
    2019-10-10
  • Ubuntu編譯內核模塊,內容體現(xiàn)系統(tǒng)日志中

    Ubuntu編譯內核模塊,內容體現(xiàn)系統(tǒng)日志中

    大家好,本篇文章主要講的是Ubuntu編譯內核模塊,內容體現(xiàn)系統(tǒng)日志中,感興趣的同學趕快來看一看吧,對你有幫助的話記得收藏一下,方便下次瀏覽
    2021-12-12
  • Linux虛擬機不顯示IP地址的三種解決方法

    Linux虛擬機不顯示IP地址的三種解決方法

    IP地址是IP協(xié)議提供的一種統(tǒng)一的地址格式,它為互聯(lián)網上的每一個網絡和每一臺主機分配一個邏輯地址,以此來屏蔽物理地址的差異,有時候我們會遇到Linux虛擬機不顯示IP地址的問題,所以本文給大家記錄了Linux虛擬機不顯示IP地址的三種解決方法,需要的朋友可以參考下
    2025-03-03
  • 如何通過其他主機查看Apahce服務器的運行狀態(tài)

    如何通過其他主機查看Apahce服務器的運行狀態(tài)

    這篇文章主要介紹了如何通過其他主機查看Apahce服務器的運行狀態(tài),需要的朋友可以參考下
    2016-04-04
  • Linux常見英文報錯中文翻譯(菜鳥必知)

    Linux常見英文報錯中文翻譯(菜鳥必知)

    這篇文章主要介紹了Linux常見英文報錯中文翻譯,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧
    2019-04-04
  • 詳解Linux運維CentOS系統(tǒng)SVN雙備份Shell腳本

    詳解Linux運維CentOS系統(tǒng)SVN雙備份Shell腳本

    本篇文章主要介紹了詳解Linux運維CentOS系統(tǒng)SVN雙備份Shell腳本,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2017-06-06
  • Ubuntu16.04源碼安裝Mininet

    Ubuntu16.04源碼安裝Mininet

    今天小編就為大家分享一篇關于Ubuntu16.04源碼安裝Mininet,小編覺得內容挺不錯的,現(xiàn)在分享給大家,具有很好的參考價值,需要的朋友一起跟隨小編來看看吧
    2018-10-10
  • Linux被中斷的系統(tǒng)如何調用詳解

    Linux被中斷的系統(tǒng)如何調用詳解

    這篇文章主要給大家介紹了關于Linux被中斷的系統(tǒng)如何調用的相關資料,文中通過示例代碼介紹的非常詳細,對大家學習或者使用Linux具有一定的參考學習價值,需要的朋友們下面來一起學習學習吧
    2019-10-10
  • vmware10.0破解版安裝centos的詳細步驟

    vmware10.0破解版安裝centos的詳細步驟

    這篇文章主要為大家詳細介紹了vmware10.0破解版安裝centos的詳細步驟,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2017-10-10
  • Apache安裝后出現(xiàn)服務無法啟動(服務里啟動出現(xiàn)錯誤代碼1)

    Apache安裝后出現(xiàn)服務無法啟動(服務里啟動出現(xiàn)錯誤代碼1)

    很多朋友都遇到過這樣的問題Apache安裝后,顯示安裝成功,但是出現(xiàn)服務無法啟動服務里啟動出現(xiàn)錯誤代碼1,怎么解決這個問題呢,下面小編通過本文給大家詳細介紹下,需要的朋友參考下吧
    2021-08-08

最新評論

射洪县| 报价| 景泰县| 永济市| 龙岩市| 安陆市| 遂宁市| 安龙县| 建昌县| 北川| 黄梅县| 沐川县| 谷城县| 漳浦县| 吉林市| 连山| 黑龙江省| 南安市| 夏河县| 永宁县| 桑日县| 池州市| 房产| 深泽县| 沈丘县| 吉木乃县| 涞源县| 齐河县| 濉溪县| 安顺市| 罗山县| 天全县| 孝感市| 乡城县| 福鼎市| 天等县| 稷山县| 富锦市| 黑龙江省| 电白县| 弥渡县|