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

Linux VPS 支持
回复
abxyz369
帖子: 5
注册时间: 2017-04-27 21:50

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

#1

帖子 abxyz369 » 2017-04-27 22:21

看到大家都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 ,而我的系统根本找不到,如图
图片

本人本来也是小白,就是喜欢瞎琢磨,还望高手指教!
onlylove
论坛版主
帖子: 5213
注册时间: 2007-01-14 16:23

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

#2

帖子 onlylove » 2017-04-28 0:19

Syntax error on line 51
Expected </VirtualHost> but saw </VirtualHost></IfModule>
英语不好就去找翻译 :em01
abxyz369
帖子: 5
注册时间: 2017-04-27 21:50

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

#3

帖子 abxyz369 » 2017-04-28 8:27

onlylove 写了:Syntax error on line 51
Expected </VirtualHost> but saw </VirtualHost></IfModule>
英语不好就去找翻译 :em01


大体意思我知道,两个部分的语法错误,第一个文件能找到,但是不知道怎么修改,第二个文件根本找不到...........
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

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

#4

帖子 poloshiao » 2017-04-28 8:58

他的路径是: /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 的發行版 要參照時 可能需要稍微調適
头像
qy117121
论坛版主
帖子: 50528
注册时间: 2007-12-14 13:40
系统: Winbuntu
来自: 志虚国乌由市
联系:

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

#5

帖子 qy117121 » 2017-04-28 9:11

既然证书都有了,那修改apache2 你的站点配置文件就可以用了啊,
可以的话请把配置文件发上来
渠月 · QY   
本人只会灌水,不负责回答问题
无聊可以点一下→ http://u.nu/ubuntu

Ubuntu 20.04 快速设置指南,请配合浏浏览器自动翻译使用

邮箱 chuan@ubuntu.org.cn
头像
qy117121
论坛版主
帖子: 50528
注册时间: 2007-12-14 13:40
系统: Winbuntu
来自: 志虚国乌由市
联系:

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

#6

帖子 qy117121 » 2017-04-28 9:12

http://vestacp.com/
我现在都是用这个,apache2 nginx mysql ,还有邮件服务什么的可选安装(默认会装)
一键安装Let's Encrypt
渠月 · QY   
本人只会灌水,不负责回答问题
无聊可以点一下→ http://u.nu/ubuntu

Ubuntu 20.04 快速设置指南,请配合浏浏览器自动翻译使用

邮箱 chuan@ubuntu.org.cn
头像
qy117121
论坛版主
帖子: 50528
注册时间: 2007-12-14 13:40
系统: Winbuntu
来自: 志虚国乌由市
联系:

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

#7

帖子 qy117121 » 2017-04-28 9:16

系统和web服务器安装方式不一样的话看那些教程也没用,
渠月 · QY   
本人只会灌水,不负责回答问题
无聊可以点一下→ http://u.nu/ubuntu

Ubuntu 20.04 快速设置指南,请配合浏浏览器自动翻译使用

邮箱 chuan@ubuntu.org.cn
abxyz369
帖子: 5
注册时间: 2017-04-27 21:50

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

#8

帖子 abxyz369 » 2017-04-28 16:07

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