欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Centos 5下配置https服務(wù)器的方法

 更新時(shí)間:2010年07月04日 23:45:56   作者:  
Centos 5下配置https服務(wù)器的步驟,需要的朋友可以參考下。
[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 進(jìn)入HTTP服務(wù)器配置文件所在目錄
[root@centos5 conf]# rm -rf ssl.*/server.* 刪除默認(rèn)或殘留的服務(wù)器證書(shū)相關(guān)文件

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

[root@centos5 ~]# openssl genrsa -out www.yang.com.key 1024 建立服務(wù)器密鑰
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 建立服務(wù)器公鑰

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 輸入國(guó)名
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 不輸入,直接回車(chē)
Common Name (eg, your name or your server's hostname) []:www.yang.com 輸入通稱(chēng)(任意)
Email Address []:admin@yang.com 輸入電子郵箱地址

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

[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 建立服務(wù)器證書(shū)

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的設(shè)置文件

# 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 重啟服務(wù)
Stopping httpd: [ OK ]
Starting httpd: [ OK ]

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

EN 10317/httpd



注:本實(shí)驗(yàn)以http://www.centospub.com/make/ssl.html為指導(dǎo)

配置SSL虛擬主機(jī)

#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 添加下面的內(nèi)容

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

相關(guān)文章

  • apache tika檢測(cè)文件是否損壞的方法

    apache tika檢測(cè)文件是否損壞的方法

    Apache Tika用于文件類(lèi)型檢測(cè)和從各種格式的文件內(nèi)容提取的庫(kù)。這篇文章主要介紹了apache tika檢測(cè)文件是否損壞,需要的朋友可以參考下
    2019-09-09
  • linux系統(tǒng) java環(huán)境變量的配置方法

    linux系統(tǒng) java環(huán)境變量的配置方法

    這篇文章主要介紹了配置linux系統(tǒng) java環(huán)境變量的相關(guān)知識(shí),非常不錯(cuò),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2018-11-11
  • 樹(shù)莓派4安裝Ubuntu 19.10的教程詳解

    樹(shù)莓派4安裝Ubuntu 19.10的教程詳解

    這篇文章主要介紹了樹(shù)莓派4安裝Ubuntu 19.10的教程,本文給大家介紹的非常詳細(xì),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2020-02-02
  • linux下虛擬機(jī)操作及輸入法設(shè)置方式

    linux下虛擬機(jī)操作及輸入法設(shè)置方式

    這篇文章主要介紹了linux下虛擬機(jī)操作及輸入法設(shè)置方式,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2023-06-06
  • CentOS下MySQL的徹底卸載的幾種方法

    CentOS下MySQL的徹底卸載的幾種方法

    本篇文章主要介紹了CentOS下MySQL的徹底卸載的幾種方法,小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧
    2017-08-08
  • 踩坑記錄之crontab每10秒執(zhí)行一次問(wèn)題

    踩坑記錄之crontab每10秒執(zhí)行一次問(wèn)題

    這篇文章主要介紹了踩坑記錄之crontab每10秒執(zhí)行一次問(wèn)題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2023-04-04
  • Linux之CentOS7下如何配置iptables

    Linux之CentOS7下如何配置iptables

    這篇文章主要介紹了Linux之CentOS7下如何配置iptables問(wèn)題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2024-02-02
  • 在CentOS 7上給一個(gè)網(wǎng)卡分配多個(gè)IP地址的方法

    在CentOS 7上給一個(gè)網(wǎng)卡分配多個(gè)IP地址的方法

    本篇文章主要介紹了在CentOS 7上給一個(gè)網(wǎng)卡分配多個(gè)IP地址的方法,具有一定的參考價(jià)值,有需要的可以了解一下。
    2017-03-03
  • Apache Prefork、Worker和Event三種MPM詳解

    Apache Prefork、Worker和Event三種MPM詳解

    這篇文章主要介紹了Apache Prefork、Worker和Event三種MPM詳解,著重介紹了配置參數(shù)部分,需要的朋友可以參考下
    2014-06-06
  • Centos7.4 zabbix3.4.7源碼安裝的方法步驟

    Centos7.4 zabbix3.4.7源碼安裝的方法步驟

    這篇文章主要介紹了Centos7.4 zabbix3.4.7源碼安裝的方法步驟,小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧
    2018-06-06

最新評(píng)論