Change Hostname over CLI

Discussion in 'Installation/Configuration' started by raydoo, Nov 24, 2021.

  1. raydoo

    raydoo New Member

    Hello!

    My Hoster just made the Scheduled Ip Address change, then i found out that Admin Domain for Ispconfig is no longer available for strange reasons.

    How do i change Ispconfig to another Domain over CLI ?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Change the hostname in the files /etc/hostname and /etc/hosts and restart the server. Then login to ISPConfig and change the hostname under System > server config.
     
  3. raydoo

    raydoo New Member

    Thank you for the quick reply, i allready done that but ispconfig ist not reachable under newdomainname:8080 as it was befor at the old one. When i try to access the domain only get the Apache Default website.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Check DNS of the new domain name to ensure it really points to the right server. The hostname is not stored in the ispconfig vhost and ISPConfig is accessible on any IP or domain that points to the server when you append port 8080 to it.
     
  5. raydoo

    raydoo New Member

    hm yeah the domain resolves to the new ip, ssh over to the new domain is also possible
     
  6. raydoo

    raydoo New Member

    ok i ran the setup Script again by for, now i can access the Admin Page

    Update: Now that i Changed the Ip Adress in the ISPconfig interface, all my service are offline.
     
    Last edited: Nov 24, 2021
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    You should not change the IP there, just the hostname. automatic network config must be off, its off by default and you probably turned it on now which caused the issue.
     
  8. raydoo

    raydoo New Member

    I checked i just entered it, but the checkbox is not activated.
    The Logfiles tell me that mysql is not reachable

    for example i don't know where he gets that ip address
    postfix/proxymap[3272]: warning: connect to mysql server 74.125.224.72: Can't connect to MySQL server on '74.125.224.72' (110)

    update:

    The Ip Address is in
    /etc/postfix/mysql-virtual_alias_domains.cf
    which i guess comes from Ispconfig
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    That file is from ISPConfig, but the IP in that file is not changed when you change the IP address under system > server config. So you must have done something else like settings a wrong localhost IP address in /etc/hosts (localhost is always 127.0.0.1 and not an external IP of your system) and then e.g. run an ISPconfig update with reconfigure services (which does not need to be run for an IP change). So the first step is that you check your /etc/hosts file to ensure that it contains correct data for localhost.
     

Share This Page