Control Web Panel

WebPanel => SSL => Topic started by: adamjedgar on June 11, 2019, 10:56:38 AM

Title: Hostname Change due to CWP not reflecting hostname assigned VPS Provider console
Post by: adamjedgar on June 11, 2019, 10:56:38 AM
HAving setup a VPS, i realised that for some reason, the CWP install did not assign the hostname as expected. Instead it applied the default from VPS service provider "guest.domain.com" (

 i thought i had changed the service providers default hostname.fqdn to "host1.mydomain.com" before install, however, i now suspect i must have not done this.


ok, so I have changed my system hostname as follows:

Dashboard>Server Settings>Change Hostname>New Hostname (host1.mydomain.com)

I then "Rebuild Mail Server" with new hostname

Postfix now reflects the change...

current settings in postfix
domain= "mydomain.com"
hostname = "host1.mydomain.com"

Dovecot fails to start...displaying an error because the SSL certificate for the new hostname "host1.mydomain.com" is not being appended to /etc/pki/tls/certs.

Quote
warning: TLS library problem: 32545:error:02001002:system library:fopen:No such file or directory:bss_file.c:402:fopen('/etc/pki/tls/certs/host1.mydomain.com.crt','r'):

Isnt CWP supposed to automatically append new certificate to the "etc/pki/tls/certs/ file when hostname is changed? (i would imagine CWP should at least add a self signed cert here)

Did i miss something?




Title: Re: Hostname Change due to CWP not reflecting hostname assigned VPS Provider console
Post by: evansa on June 12, 2019, 10:07:05 PM
please run sh/scripts/generate_hostname_ssl
Title: Re: Hostname Change due to CWP not reflecting hostname assigned VPS Provider console
Post by: adamjedgar on June 12, 2019, 11:45:59 PM
thanks for that.

i was logged in as root user...when enterring code as shown i got an error...

[root@host1 ~]# sh/scripts/generate_hostname_ssl
-bash: sh/scripts/generate_hostname_ssl: No such file or directory


instead, i entered the following (without the "sh")

[root@server4 ~]# /scripts/generate_hostname_ssl

Which then executed the script without any problem.

I am assuming this is ok as Dovecot now starts without issue.

Title: Re: Hostname Change due to CWP not reflecting hostname assigned VPS Provider console
Post by: evansa on June 13, 2019, 07:17:40 AM
sure thats ok