Let's Encrypt 配置有好几个地方未询问,配置失败,访问网站显示502

问答中心分类: OneinStackLet's Encrypt 配置有好几个地方未询问,配置失败,访问网站显示502
Eagle asked 6 年 ago
配置过程如下,其中域名使用 xxx代替了,麻烦帮我看一下,谢谢!
IE查询证书提示证书错误。

[root@iZ25g84j4ypZ oneinstack]# ./vhost.sh
#######################################################################
# OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+ #
# For more information please visit http://oneinstack.com #
#######################################################################
Do you want to setup SSL under Nginx? [y/n]: y
Please input domain(example: http://www.linuxeye.com): http://www.xxx.com
domain=www.xxx.com
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
Country Name (2 letter code) [CN]: CN
State or Province Name (full name) [Shanghai]: Yunnan
Locality Name (eg, city) [Shanghai]: Kunming
Organization Name (eg, company) [LinuxEye Inc.]: Yunnan xxx Inc.
Organizational Unit Name (eg, section) [IT Dept.]: IT
Do you want to add more domain name? [y/n]: n
Please input the directory for the domain:www.xxx.com :
(Default directory: /data/wwwroot/www.xxx.com): /data/wwwroot/xxx.com/pub
Create Virtul Host directory......
set permissions of Virtual Host directory......
Do you want to add hotlink protection? [y/n]: n
Allow Nginx/Tengine access_log? [y/n]: y
You access log file=/data/wwwlogs/www.xxx.com_nginx.log
Allow Apache access_log? [y/n]: y
You access log file=/data/wwwlogs/www.xxx.com_apache.log
nginx: [warn] conflicting server name "www.xxx.com" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "www.xxx.com" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "www.xxx.com" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "www.xxx.com" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "www.xxx.com" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "www.xxx.com" on 0.0.0.0:443, ignored
nginx: [warn] conflicting server name "www.xxx.com" on 0.0.0.0:443, ignored
nginx: [warn] conflicting server name "www.xxx.com" on 0.0.0.0:443, ignored
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
Reload Nginx......
nginx: [warn] conflicting server name "www.xxx.com" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "www.xxx.com" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "www.xxx.com" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "www.xxx.com" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "www.xxx.com" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "www.xxx.com" on 0.0.0.0:443, ignored
nginx: [warn] conflicting server name "www.xxx.com" on 0.0.0.0:443, ignored
nginx: [warn] conflicting server name "www.xxx.com" on 0.0.0.0:443, ignored
Syntax OK
Restart Apache......
#######################################################################
# OneinStack for CentOS/RadHat 5+ Debian 6+ and Ubuntu 12+ #
# For more information please visit http://oneinstack.com #
#######################################################################
Your domain: http://www.xxx.com
Nginx Virtualhost conf: /usr/local/nginx/conf/vhost/www.xxx.com.conf
Apache Virtualhost conf: /usr/local/apache/conf/vhost/www.xxx.com.conf
Directory of: /data/wwwroot/xxx.com/pub
Self-signed SSL Certificate: /usr/local/nginx/conf/www.xxx.com.crt
SSL Private Key: /usr/local/nginx/conf/www.xxx.com.key
SSL CSR File: /usr/local/nginx/conf/www.xxx.com.csr
[root@iZ25g84j4ypZ oneinstack]# service nginx restart
Restarting nginx (via systemctl): [ OK ]

1 Answers
oneinstack answered 6 年 ago
未安装Let's Encrypt客户端,如果启用Let’s Encrypt?

  1. ./addons.sh 选择7,安装Let’s Encrypt客户端
  2. vhost.sh ssl和Let’s Encrypt都选择y即可