Centos 7 and changing hostname and ssl cp

Brenden

Verified User
Hi,

I'm trying to change my DA hostname and CP SSL cert without success.

I've update the hostname in Administrator settings > Server Settings > Servers Hostname

I then ran:
Code:
cd /usr/local/directadmin/scripts
./letsencrypt.sh request_single `hostname` 4096

#secure hostname
cd /usr/local/directadmin
./directadmin set ssl 1
./directadmin set carootcert /usr/local/directadmin/conf/carootcert.pem
./directadmin set ssl_redirect_host $HOSTNAME
service directadmin restart
It feels like I also need to update /usr/local/directadmin/conf/ca.san_config but not sure how to re-genearte the ssl? Any ideas?
 

scriptkitty

Verified User
Hello,

First if all, what is the output of `hostname`? Is it the old hostname or the new hostname?

Is it a VPS? If so, you may have to have the hostname changed in the virtualization software, in which case, you'd normally need to ask your hosting provider to do. There is also a script to change the hostname in /usr/local/directadmin/scripts:
Code:
sh /usr/local/directadmin/scripts/hostname.sh new.hostname.tld
This script sets the old hostname to the output of the `hostname --fqdn` command, so you'll probably want to run this first before your host updates the hostname in the virtualization software (if necessary), because it won't make the appropriate changes then.

Does the hostname resolve to your server's IP? If not, does a DNS zone exist for it? Is the following set in the DA configuration if not?
Code:
/usr/local/directadmin/directadmin c | grep -i named_rename_hostname_zone
Does the hostname and servername match?
Code:
hostname 
/usr/local/directadmin/directadmin c | grep servername
Do you get any errors when you run the letsencrypt.sh script for the hostname? Does the output seem to indicate success?

If it fails, is the following path setup?

Code:
[root@host scripts]# ls -lah /var/www/html/.well-known/acme-challenge/
total 8.0K
drwxr-xr-x 2 webapps webapps 4.0K Oct 16 10:52 .
drwxr-xr-x 3 webapps webapps 4.0K Jul 15 11:28 ..
[root@host scripts]#
If you place a text file in that path and curl it, can you access it?
Code:
curl your.hostname.tld/.well-known/acme-challenge/text.file
I hope this helps!
 
Top