首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >申请并下载ssl证书配置到apache之后,apache启动失败?

申请并下载ssl证书配置到apache之后,apache启动失败?

提问于 2016-11-11 13:02:11
回答 2关注 1查看 1.1K

我在腾讯云申请了SLL证书,并在服务器(CentOS, 腾讯云主机)安装了modssl与openssl. 并测试安装可用。但是当我将申请到的证书配置到apache的时候,apache启动失败。由于缺乏经验,且证书安装文档中没有相关问题的解决方法,故在此求助。下面附上我的操作及指令记录, 请大神过目(已经将真实域名用汉字“我的域名”代替)。操作步骤:本地操作:1.在腾讯云域名服务申请证书,填写域名,点击申请。2.按照提示配置CNAME解析,验证成功。3.下载证书文件(文件名“我的域名.zip”,包含Apache、Nginx和IIS的配置文件),将配置文件上传到服务器。服务器端操作:1.在服务器yum安装mod_ssl和openssl2.在 /etc/httpd/conf.d/ssl.conf中配置DocumentRoot和ServerName分别为我的项目路径和域名。/font(此时已经可以通过https://我的域名来访问了,只不过浏览器提示证书不被信任)3.解压之前申请到的证书文件,在Apache/下得到三个文件:-rw-r--r-- 1 root root 1930 11月 10 15:29 1_root_bundle.crt-rw-r--r-- 1 root root 2077 11月 10 15:29 2我的域名.crt-rw-r--r-- 1 root root 1706 11月 10 15:29 3我的域名.key并将三个文件保存到如下路径:cp 1_root_bundle.crt /etc/pki/tls/certs/cp 2我的域名.crt /etc/pki/tls/certscp 3我的域名.key /etc/pki/tls/private4.修改ssl.conf,将证书文件指向我申请到的文件:##SSLCertificateFile /etc/pki/tls/certs/localhost.crtSSLCertificateFile /etc/pki/tls/certs/1_root_bundle.crt##SSLCertificateKeyFile /etc/pki/tls/private/localhost.keySSLCertificateKeyFile /etc/pki/tls/private/3我的域名.key#SSLCertificateChainFile /etc/pki/tls/certs/server-chain.crtSSLCertificateChainFile /etc/pki/tls/certs/2_我的域名.crt5.重启apache服务器,提示启动失败。root@VM_140_8_centos conf.d# service httpd restartRedirecting to /bin/systemctl restart httpd.serviceJob for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.启动失败的相关信息如下:root@VM_140_8_centos conf.d# systemctl status httpd.service -ahttpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled) Active: failed (Result: exit-code) since 五 2016-11-11 123844 CST; 53s ago Docs: man:httpd(8) man:apachectl(8) Process: 9878 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE) Process: 9877 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE) Main PID: 9877 (code=exited, status=1/FAILURE)11月 11 123843 VM_140_8_centos systemd1: Starting The Apache HTTP Server...11月 11 123843 VM_140_8_centos httpd9877: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message11月 11 123843 VM_140_8_centos systemd1: httpd.service: main process exited, code=exited, status=1/FAILURE11月 11 123844 VM_140_8_centos kill9878: kill: cannot find process ""11月 11 123844 VM_140_8_centos systemd1: httpd.service: control process exited, code=exited status=111月 11 123844 VM_140_8_centos systemd1: Failed to start The Apache HTTP Server.11月 11 123844 VM_140_8_centos systemd1: Unit httpd.service entered failed state.如果需要我提供其余信息,请留言给我,不胜感激!

相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档