最新消息:20210917 已从crifan.com换到crifan.org

【已解决】Vultr的CentOS中新建crifan.org的虚拟主机的域名

域名 crifan 504浏览 0评论
折腾:
【未解决】网站从crifan.com搬家到整站复制到crifan.org
期间,去Vultr的CentOS的OneInStack中,给crifan.org新建host域名 虚拟主机
先去crifan.com所在的Vultr中,新建host域名:www.crifan.org
然后整站文件复制过去
[root@crifan oneinstack]# ./vhost.sh 


#######################################################################
#       OneinStack for CentOS/RedHat 6+ Debian 7+ and Ubuntu 12+      #
#       For more information please visit https://oneinstack.com      #
#######################################################################


What Are You Doing?
        1. Use HTTP Only
        2. Use your own SSL Certificate and Key
        3. Use Let's Encrypt to Create SSL Certificate and Key
        q. Exit
Please input the correct option: 3


Please input domain(example: www.example.com): www.crifan.org
domain=www.crifan.org


Please input the directory for the domain:www.crifan.org :
(Default directory: /data/wwwroot/www.crifan.org): 
Virtual Host Directory=/data/wwwroot/www.crifan.org


Create Virtul Host directory......
set permissions of Virtual Host directory......


Do you want to add more domain name? [y/n]: n


Do you want to redirect all HTTP requests to HTTPS? [y/n]: y


Let's Encrypt Verify error! DNS problem: NXDOMAIN looking up A for www.crifan.org
[Wed Sep  1 07:07:03 CST 2021] Creating domain key
[Wed Sep  1 07:07:03 CST 2021] The domain key is here: /root/.acme.sh/www.crifan.org/www.crifan.org.key
[Wed Sep  1 07:07:03 CST 2021] Single domain='www.crifan.org'
[Wed Sep  1 07:07:03 CST 2021] Getting domain auth token for each domain
[Wed Sep  1 07:07:06 CST 2021] Getting webroot for domain='www.crifan.org'
[Wed Sep  1 07:07:06 CST 2021] Verifying: www.crifan.org
[Wed Sep  1 07:07:10 CST 2021] www.crifan.org:Verify error:Invalid response from https://www.crifan.org/.well-known/acme-challenge/a1su0BsyXpyDtSd7pOF14prrNg41Mw7YUvR25iTHUGs [34.102.136.180]: 
[Wed Sep  1 07:07:10 CST 2021] Please add '--debug' or '--log' to check more details.
[Wed Sep  1 07:07:10 CST 2021] See: https://github.com/acmesh-official/acme.sh/wiki/How-to-debug-acme.sh
Error: Create Let's Encrypt SSL Certificate failed!
报错了。
ssl证书创建出错
好像是:
我买了crifan.org后,还没去
godaddy中 或 国内的DNSPod 中
设置DNS?
好像是忘了,去操作:
【已解决】给crifan.org设置DNS域名解析
然后接着去Vultr中VPS去OneInStack中重新创建vhost
[root@crifan oneinstack]# ./vhost.sh 


#######################################################################
#       OneinStack for CentOS/RedHat 6+ Debian 7+ and Ubuntu 12+      #
#       For more information please visit https://oneinstack.com      #
#######################################################################


What Are You Doing?
        1. Use HTTP Only
        2. Use your own SSL Certificate and Key
        3. Use Let's Encrypt to Create SSL Certificate and Key
        q. Exit
Please input the correct option: 3


Please input domain(example: www.example.com): www.crifan.org
domain=www.crifan.org


Please input the directory for the domain:www.crifan.org :
(Default directory: /data/wwwroot/www.crifan.org): 
Virtual Host Directory=/data/wwwroot/www.crifan.org


Create Virtul Host directory......
set permissions of Virtual Host directory......


Do you want to add more domain name? [y/n]: n


Do you want to redirect all HTTP requests to HTTPS? [y/n]: y
[Thu Sep 16 14:22:38 CST 2021] Single domain='www.crifan.org'
[Thu Sep 16 14:22:38 CST 2021] Getting domain auth token for each domain
[Thu Sep 16 14:22:41 CST 2021] Getting webroot for domain='www.crifan.org'
[Thu Sep 16 14:22:41 CST 2021] Verifying: www.crifan.org
[Thu Sep 16 14:22:45 CST 2021] Success
[Thu Sep 16 14:22:45 CST 2021] Verify finished, start to sign.
[Thu Sep 16 14:22:45 CST 2021] Lets finalize the order, Le_OrderFinalize: https://acme-v02.api.letsencrypt.org/acme/finalize/57656599/24829285650
[Thu Sep 16 14:22:46 CST 2021] Download cert, Le_LinkCert: https://acme-v02.api.letsencrypt.org/acme/cert/0395bf053900472c39c769edfa983a0ccfc7
[Thu Sep 16 14:22:47 CST 2021] Cert success.
-----BEGIN CERTIFICATE-----
MIIFI………..uwIUfQp+Q
Z2+JVZmv98L3ny/SCCRqcNvn1qtxLGw=
-----END CERTIFICATE-----
[Thu Sep 16 14:22:47 CST 2021] Your cert is in  /root/.acme.sh/www.crifan.org/www.crifan.org.cer 
[Thu Sep 16 14:22:47 CST 2021] Your cert key is in  /root/.acme.sh/www.crifan.org/www.crifan.org.key 
[Thu Sep 16 14:22:47 CST 2021] The intermediate CA cert is in  /root/.acme.sh/www.crifan.org/ca.cer 
[Thu Sep 16 14:22:47 CST 2021] And the full chain certs is there:  /root/.acme.sh/www.crifan.org/fullchain.cer 


Do you want to add hotlink protection? [y/n]: n


Allow Rewrite rule? [y/n]: y


Please input the rewrite of programme :
wordpress,opencart,magento2,drupal,joomla,codeigniter,laravel
thinkphp,pathinfo,discuz,typecho,ecshop,nextcloud,zblog rewrite was exist.
(Default rewrite: other): wordpress
You choose rewrite=wordpress


Allow Nginx/Tengine/OpenResty access_log? [y/n]: y
You access log file=/data/wwwlogs/www.crifan.org_nginx.log


nginx: the configuration file /usr/local/tengine/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/tengine/conf/nginx.conf test is successful
Reload Nginx......


#######################################################################
#       OneinStack for CentOS/RedHat 6+ Debian 7+ and Ubuntu 12+      #
#       For more information please visit https://oneinstack.com      #
#######################################################################
Your domain:                  www.crifan.org
Virtualhost conf:             /usr/local/tengine/conf/vhost/www.crifan.org.conf
Directory of:                 /data/wwwroot/www.crifan.org
Rewrite rule:                 /usr/local/tengine/conf/rewrite/wordpress.conf
Let's Encrypt SSL Certificate:/usr/local/tengine/conf/ssl/www.crifan.org.crt
SSL Private Key:              /usr/local/tengine/conf/ssl/www.crifan.org.key
即可。
【总结】
此处,去给crifan.org新建虚拟主机和host域名:
  • 去godaddy中更新DNS
    • 为自己用的腾讯的DNSPod中的DNS服务器
    • 目的:使得能解析crifan.org到自己的Vultr的服务器的IP
  • 再去用OneInStack的vhost.sh去新增域名 crifan.org

转载请注明:在路上 » 【已解决】Vultr的CentOS中新建crifan.org的虚拟主机的域名

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
92 queries in 0.186 seconds, using 23.27MB memory