Apache配置https启动不了的解决办法

2021-07-04 03:06

阅读:529

标签:安全协议   工作   direct   efi   ecc   pac   lis   httpd   路径   

准备工作:有备案了的http域名,去阿里云或者腾讯云购买SSL证书,有免费1年的;

第一步;

找到 #LoadModule ssl_module modules/mod_ssl.so 和 #Include conf/extra/httpd-ssl.conf,去掉前面的#号注释;

第二步;

编辑Apache根目录下 conf/extra/httpd-ssl.conf 文件,修改如下内容:(路径一定要填对,不然启动不了)

Listen 443

  SSLEngine on
  SSLProtocol all -SSLv2 -SSLv3  //去除不安全协议的
  SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5   //加密的
  SSLCertificateFile "C:/phpStudy/Apache/conf/ssl/2_www.weiduweilan.cn.crt"  //证书公钥
  SSLCertificateKeyFile "C:/phpStudy/Apache/conf/ssl/3_www.weiduweilan.cn.key"  //证书私钥
  SSLCertificateChainFile "C:/phpStudy/Apache/conf/ssl/1_root_bundle.crt" //根证书
  DocumentRoot  "C:\phpStudy\WWW\Zerg\public"
  
    Options +Indexes +FollowSymLinks +ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
    Require all granted
  

如果还是启动不了,有80端口占用错误;删除conf文件夹的vhosts.conf文件的

Apache配置https启动不了的解决办法

标签:安全协议   工作   direct   efi   ecc   pac   lis   httpd   路径   

原文地址:http://www.cnblogs.com/lqzweb/p/7121980.html


评论


亲,登录后才可以留言!