Author Topic: Same hostname and domain. AutoSSL mismatch  (Read 5592 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Same hostname and domain. AutoSSL mismatch
« on: February 02, 2019, 05:32:52 AM »
Hi, Need some advice on the following.

I'm using 1 VPS for just 1 website for my company. I don't do hosting for any other domain. I'm using digital ocean as my VPS.

What I did during setup was

1) My server name was set to mycompanydomain.com in digitalocean.
2) After installation of Centos and CWP7, CWP7 shows my hostname is mycompanydomain.com.
3) Try to add domain mycompanydomain.com was rejected due to conflict with hostname.
4) Change hostname to srv1.mycompanydomain.com.
5) Add domain and new account using mycompanydomain.com is successful.
6) Migrate website to new account folder. Successful.
7) Try to install autoSSL was successful, but during test, I got mismatch error. SSL was generated based on mycompanydomain.com and srv1.mycompanydomain.com

Can anyone advise me how to go about doing the setup.?

BTW, i tried other control panel and decided to stick to CWP7 because it seems more user friendly for someone who doesn't really know how to use ssh.

Any help is appreciated
« Last Edit: February 02, 2019, 06:03:05 AM by ovewrite »

Offline
*
Re: Same hostname and domain. AutoSSL mismatch
« Reply #1 on: February 03, 2019, 11:35:59 PM »
1st of all, make sure that your hostname is set to srv1.domain.com , use this command in putty:
Code: [Select]
hostname srv1.domain.comMake sure that the hostname is set in your dns too (especially if you use external dns server) and the PTR is correctly set for your hostname.

Wait for a few minutes so the DNS will propagate.
After that, set the hostname in cwp admin. When you set this, the cwp will automatically generate a SSL for your hostname, and your SSL will be generated for srv1.domain.com.

The next step is to generate a SSL for your other account you created : domain.com. Enter in your CWP user panel, and generate the SSL for domain.com.

You may encounter an httpd error after this. If your httpd is doing this, in putty write:
Code: [Select]
killall -9 httpdThis code will close all the httpd unclosed connections.
Next step is to go to Dashboard, and start httpd server.

Offline
*
Re: Same hostname and domain. AutoSSL mismatch
« Reply #2 on: February 06, 2019, 03:05:29 PM »
Hi, thank you for your help. Just to clarify, after I can change the hostname to svr1.domain.com on my server, I will need to change all the record in the DNS record to point to svr1.domain.com... e.g.

Original
A     domain.com direct to xx.xx.xx.xx
Change to
A     svr.domain.com direct to xx.xx.xx.xx

Original
MX   domain.com mail handled by mail.domain.com
Change to
MX  svr1.domain.com mail handled by svr1.mail.domain.com

Do I also need to change the droplet name from domain.com to svr1.domain.com?

Thanks