分页: 1 / 1

ubuntu14.04系统vps装的Apache,在配制Let's Encrypt免费SSL的时候失败,望高手指导!

发表于 : 2017-04-27 22:21
abxyz369
看到大家都HTTPS:了,自己也想装一回,可是在网上收集了很多教程都不行,最后的界面如图
图片
意思好像是证书存在了,但是安装失败
Error while running apache2ctl configtest.
Action 'configtest' failed.
The Apache error log may have more information.

apache2: Syntax error on line 219 of /etc/apache2/apache2.conf: Syntax error on line 51 of /etc/apache2/sites-enabled/renzaijianghu-le-ssl.conf: Expected </VirtualHost> but saw </VirtualHost></IfModule>

Rolling back to previous server configuration...
Error while running apache2ctl configtest.
Action 'configtest' failed.
The Apache error log may have more information.

apache2: Syntax error on line 219 of /etc/apache2/apache2.conf: Syntax error on line 51 of /etc/apache2/sites-enabled/renzaijianghu-le-ssl.conf: Expected </VirtualHost> but saw </VirtualHost></IfModule>


IMPORTANT NOTES:
- We were unable to install your certificate, however, we
successfully restored your server to its prior configuration.
- Congratulations! Your certificate and chain have been saved at
/etc/letsencrypt/live/renzaijianghu.net/fullchain.pem. Your cert
will expire on 2017-07-26. To obtain a new or tweaked version of
this certificate in the future, simply run certbot-auto again with
the "certonly" option. To non-interactively renew *all* of your
certificates, run "certbot-auto renew"
而且我也在VPS上找到了证书位置

安装过程完全执行的教程:http://blog.csdn.net/zstack_org/article ... s/53389305

但是最后出错了!

后来看到Apache的配制教程:http://www.chinaz.com/web/2015/1221/486106_3.shtml

但是这个我根本找不到相应文件的路径,他的路径是: /usr/local/apache/conf/httpd.conf ,而我的系统根本找不到,如图
图片

本人本来也是小白,就是喜欢瞎琢磨,还望高手指教!

Re: ubuntu14.04系统vps装的Apache,在配制Let's Encrypt免费SSL的时候失败,望高手指

发表于 : 2017-04-28 0:19
onlylove
Syntax error on line 51
Expected </VirtualHost> but saw </VirtualHost></IfModule>
英语不好就去找翻译 :em01

Re: ubuntu14.04系统vps装的Apache,在配制Let's Encrypt免费SSL的时候失败,望高手指

发表于 : 2017-04-28 8:27
abxyz369
onlylove 写了:Syntax error on line 51
Expected </VirtualHost> but saw </VirtualHost></IfModule>
英语不好就去找翻译 :em01


大体意思我知道,两个部分的语法错误,第一个文件能找到,但是不知道怎么修改,第二个文件根本找不到...........

Re: ubuntu14.04系统vps装的Apache,在配制Let's Encrypt免费SSL的时候失败,望高手指

发表于 : 2017-04-28 8:58
poloshiao
他的路径是: /usr/local/apache/conf/httpd.conf ,而我的系统根本找不到,如图
https://help.ubuntu.com/14.04/servergui ... figuration
httpd.conf: historically the main Apache2 configuration file, named after the httpd daemon. Now the file does not exist. In older versions of Ubuntu the file might be present, but empty, as all configuration options have been moved to the below referenced directories.
httpd.conf 是 Ubuntu 早期的版本 才有
現在已經分散到下述設定中
意思是 該篇文章 可能適用於 Ubuntu 早期版本 或 其它 非 Ubuntu 的發行版 要參照時 可能需要稍微調適

Re: ubuntu14.04系统vps装的Apache,在配制Let's Encrypt免费SSL的时候失败,望高手指

发表于 : 2017-04-28 9:11
qy117121
既然证书都有了,那修改apache2 你的站点配置文件就可以用了啊,
可以的话请把配置文件发上来

Re: ubuntu14.04系统vps装的Apache,在配制Let's Encrypt免费SSL的时候失败,望高手指

发表于 : 2017-04-28 9:12
qy117121
http://vestacp.com/
我现在都是用这个,apache2 nginx mysql ,还有邮件服务什么的可选安装(默认会装)
一键安装Let's Encrypt

Re: ubuntu14.04系统vps装的Apache,在配制Let's Encrypt免费SSL的时候失败,望高手指

发表于 : 2017-04-28 9:16
qy117121
系统和web服务器安装方式不一样的话看那些教程也没用,

Re: ubuntu14.04系统vps装的Apache,在配制Let's Encrypt免费SSL的时候失败,望高手指

发表于 : 2017-04-28 16:07
abxyz369
qy117121 写了:系统和web服务器安装方式不一样的话看那些教程也没用,
谢谢,问题已经解决,但是还是有个新问题,我HTTPS,旁边的不是绿色的小锁,有个黄色的小三角,怎么回事呀