wdcpV3面板安装ssl证书 apache教程 子站SSL配置
本帖最后由 q1082121 于 2016-11-24 12:31 编辑 方案二 apache 1、把apache类型的ssl三个文件上传到:/www/wdlinux//www/wdlinux/httpd-2.4.18/ /conf/下面即可! 三个文件分别是根证书、私钥、公钥 2、打开 /www/wdlinux/httpd-2.2.24/conf/httpd.conf 开启 LoadModule slotmem_shm_module modules/mod_slotmem_shm.so LoadModule ssl_module modules/mod_ssl.so LoadModule socache_shmcb_module modules/mod_socache_shmcb.so 查找 #Include conf/extra/httpd-ssl.conf (删除行首的配置语句注释符号“#”保存退出) 3、进入子站对应配置文件 即vhost文件夹下的 XX.XXXX.com.conf 并编辑文件 示例配置: <VirtualHost *:443> DocumentRoot "/www/web/company_api/public_html/public" ServerName api.tzsuteng.com ErrorLog "/www/wdlinux/httpd-2.4.18/logs/error_log" TransferLog "/www/wdlinux/httpd-2.4.18/logs/access_log" SSLEngine on (将服务器证书公钥配置到该路径下); SSLCertificateFile "/www/wdlinux/httpd-2.4.18/conf/www.tzsuteng.com_Apache.crt" (将服务器证书私钥配置到该路径下); SSLCertificateKeyFile "/www/wdlinux/httpd-2.4.18/conf/tzsuteng.key" (根CA证书配置到该路径下); SSLCertificateChainFile "/www/wdlinux/httpd-2.4.18/conf/sutengroot.crt" <FilesMatch "\.(cgi|shtml|phtml|php)$"> SSLOptions +StdEnvVars </FilesMatch> <Directory "/www/web/company_api"> SSLOptions +StdEnvVars </Directory> BrowserMatch "MSIE [2-5]" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 CustomLog "/www/wdlinux/httpd-2.4.18/logs/ssl_request_log" \ "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" </VirtualHost> 还有别忘记 443端口开启 ![]() ![]() ![]() |