Results 1 to 2 of 2

Thread: Centos 7 and changing hostname and ssl cp

  1. #1
    Join Date
    Oct 2003

    Centos 7 and changing hostname and ssl cp


    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:
    cd /usr/local/directadmin/scripts
    ./ 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?

  2. #2
    Join Date
    Jul 2019

    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:
    sh /usr/local/directadmin/scripts/ 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?
    /usr/local/directadmin/directadmin c | grep -i named_rename_hostname_zone
    Does the hostname and servername match?
    /usr/local/directadmin/directadmin c | grep servername
    Do you get any errors when you run the script for the hostname? Does the output seem to indicate success?

    If it fails, is the following path setup?

    [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?
    curl your.hostname.tld/.well-known/acme-challenge/text.file
    I hope this helps!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts