SSLCertificateFile /etc/pki/tls/certs/3734130_blog.qinqinxia.com_chain.crt
SSLCertificateKeyFile /etc/pki/tls/private/3734130_blog.qinqinxia.com.key
SSLCertificateChainFile /etc/pki/tls/certs/3734130_blog.qinqinxia.com_public.crt
[root@izhp3flliiu1wistk24f3cz modules]# yum -y install mod_ssl
Loaded plugins: fastestmirror
base | 3.6 kB 00:00:00
epel | 4.7 kB 00:00:00
extras | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
(1/5): epel/x86_64/group_gz | 95 kB 00:00:00
(2/5): epel/x86_64/updateinfo | 1.0 MB 00:00:00
(3/5): updates/7/x86_64/primary_db | 7.6 MB 00:00:00
(4/5): extras/7/x86_64/primary_db | 165 kB 00:00:00
(5/5): epel/x86_64/primary_db | 6.8 MB 00:00:00
Determining fastest mirrors
Resolving Dependencies
--> Running transaction check
---> Package mod_ssl.x86_64 1:2.4.6-90.el7.centos will be installed
--> Processing Dependency: httpd = 2.4.6-90.el7.centos for package: 1:mod_ssl-2.4.6-90.el7.centos.x86_64
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-80.el7.centos will be updated
---> Package httpd.x86_64 0:2.4.6-90.el7.centos will be an update
--> Processing Dependency: httpd-tools = 2.4.6-90.el7.centos for package: httpd-2.4.6-90.el7.centos.x86_64
--> Running transaction check
---> Package httpd-tools.x86_64 0:2.4.6-80.el7.centos will be updated
---> Package httpd-tools.x86_64 0:2.4.6-90.el7.centos will be an update
--> Finished Dependency Resolution
Dependencies Resolved
=======================================================================================================================================================
Package Arch Version Repository Size
=======================================================================================================================================================
Installing:
mod_ssl x86_64 1:2.4.6-90.el7.centos base 112 k
Updating for dependencies:
httpd x86_64 2.4.6-90.el7.centos base 2.7 M
httpd-tools x86_64 2.4.6-90.el7.centos base 91 k
Transaction Summary
=======================================================================================================================================================
Install 1 Package
Upgrade ( 2 Dependent packages)
Total download size: 2.9 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/3): httpd-tools-2.4.6-90.el7.centos.x86_64.rpm | 91 kB 00:00:00
(2/3): httpd-2.4.6-90.el7.centos.x86_64.rpm | 2.7 MB 00:00:00
(3/3): mod_ssl-2.4.6-90.el7.centos.x86_64.rpm | 112 kB 00:00:00
-------------------------------------------------------------------------------------------------------------------------------------------------------
Total 5.3 MB/s | 2.9 MB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : httpd-tools-2.4.6-90.el7.centos.x86_64 1/5
Updating : httpd-2.4.6-90.el7.centos.x86_64 2/5
Installing : 1:mod_ssl-2.4.6-90.el7.centos.x86_64 3/5
Cleanup : httpd-2.4.6-80.el7.centos.x86_64 4/5
Cleanup : httpd-tools-2.4.6-80.el7.centos.x86_64 5/5
Verifying : httpd-tools-2.4.6-90.el7.centos.x86_64 1/5
Verifying : httpd-2.4.6-90.el7.centos.x86_64 2/5
Verifying : 1:mod_ssl-2.4.6-90.el7.centos.x86_64 3/5
Verifying : httpd-tools-2.4.6-80.el7.centos.x86_64 4/5
Verifying : httpd-2.4.6-80.el7.centos.x86_64 5/5
Installed:
mod_ssl.x86_64 1:2.4.6-90.el7.centos
Dependency Updated:
httpd.x86_64 0:2.4.6-90.el7.centos httpd-tools.x86_64 0:2.4.6-90.el7.centos
Complete!
[root@izhp3flliiu1wistk24f3cz modules]#
[root@izhp3flliiu1wistk24f3cz modules]# pwd
/etc/httpd/modules
[root@izhp3flliiu1wistk24f3cz modules]# ls
libphp5.so mod_authn_core.so mod_authz_host.so mod_cgi.so mod_dir.so mod_heartbeat.so mod_log_debug.so mod_mpm_worker.so mod_proxy_http.so mod_rewrite.so mod_ssl.so mod_version.so
mod_access_compat.so mod_authn_dbd.so mod_authz_owner.so mod_charset_lite.so mod_dumpio.so mod_heartmonitor.so mod_log_forensic.so mod_negotiation.so mod_proxy_scgi.so mod_sed.so mod_status.so mod_vhost_alias.so
mod_actions.so mod_authn_dbm.so mod_authz_user.so mod_data.so mod_echo.so mod_include.so mod_logio.so mod_proxy_ajp.so mod_proxy.so mod_setenvif.so mod_substitute.so mod_watchdog.so
mod_alias.so mod_authn_file.so mod_autoindex.so mod_dav_fs.so mod_env.so mod_info.so mod_lua.so mod_proxy_balancer.so mod_proxy_wstunnel.so mod_slotmem_plain.so mod_suexec.so
mod_allowmethods.so mod_authn_socache.so mod_buffer.so mod_dav_lock.so mod_expires.so mod_lbmethod_bybusyness.so mod_macro.so mod_proxy_connect.so mod_ratelimit.so mod_slotmem_shm.so mod_systemd.so
mod_asis.so mod_authz_core.so mod_cache_disk.so mod_dav.so mod_ext_filter.so mod_lbmethod_byrequests.so mod_mime_magic.so mod_proxy_express.so mod_reflector.so mod_socache_dbm.so mod_unique_id.so
mod_auth_basic.so mod_authz_dbd.so mod_cache.so mod_dbd.so mod_file_cache.so mod_lbmethod_bytraffic.so mod_mime.so mod_proxy_fcgi.so mod_remoteip.so mod_socache_memcache.so mod_unixd.so
mod_auth_digest.so mod_authz_dbm.so mod_cache_socache.so mod_deflate.so mod_filter.so mod_lbmethod_heartbeat.so mod_mpm_event.so mod_proxy_fdpass.so mod_reqtimeout.so mod_socache_shmcb.so mod_userdir.so
mod_authn_anon.so mod_authz_groupfile.so mod_cgid.so mod_dialup.so mod_headers.so mod_log_config.so mod_mpm_prefork.so mod_proxy_ftp.so mod_request.so mod_speling.so mod_usertrack.so
[root@izhp3flliiu1wistk24f3cz modules]#
[root@izhp3flliiu1wistk24f3cz modules]# ls /etc/httpd/conf.d
autoindex.conf php.conf README ssl.conf userdir.conf welcome.conf
[root@izhp3flliiu1wistk24f3cz modules]#
SSLCertificateFile xxx_public.crt
SSLCertificateKeyFile xxx.key
SSLCertificateChainFile xxx_chain.crt
SSLCertificateFile /etc/pki/tls/certs/3734130_blog.qinqinxia.com_public.crt
SSLCertificateKeyFile /etc/pki/tls/private/3734130_blog.qinqinxia.com.key
SSLCertificateChainFile /etc/pki/tls/certs/3734130_blog.qinqinxia.com_chain.crt
# 子站点配置
ServerName blog.qinqinxia.com #域名
DocumentRoot "/www/wwwroot/blog_online/www/" #项目的路径
DirectoryIndex index.php index.html index.htm
# 项目目录权限配置
<Directory "/www/wwwroot/www">
Options +Includes -Indexes
AllowOverride All
Order Deny,Allow
Allow from All
</Directory>
#引入外部的ssl配置文件
Include /etc/httpd/conf.d/ssl.conf
systemctl restart httpd
则将 ssl.conf 文件备份一下,然后替换内容为如下纯净版的,其中配置换成与你对应的,然后重启apahce
Listen 443
<VirtualHost *:443>
SSLEngine on
SSLProtocol all -SSLv2 -SSLv3
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
SSLCertificateFile /etc/pki/tls/certs/3734130_blog.qinqinxia.com_public.crt
SSLCertificateKeyFile /etc/pki/tls/private/3734130_blog.qinqinxia.com.key
SSLCertificateChainFile /etc/pki/tls/certs/3734130_blog.qinqinxia.com_chain.crt
# 子站点配置
ServerName blog.qinqinxia.com
DocumentRoot "/www/wwwroot/blog_online/www/"
DirectoryIndex index.php index.html index.htm
<Directory /www/wwwroot/blog_online/www/>
Options +Indexes +FollowSymLinks +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName blog.qinqinxia.com
Redirect permanent / https://blog.qinqinxia.com/
DocumentRoot "/www/wwwroot/blog/www/"
DirectoryIndex index.php index.html index.htm
<Directory "/www/wwwroot/blog/www/">
Options +Includes -Indexes
AllowOverride All
Order Deny,Allow
Allow from All
</Directory>
</VirtualHost>