Changing the Server Hostname

Discussion in 'Installation/Configuration' started by Xtreem1986, Mar 12, 2007.

  1. Xtreem1986

    Xtreem1986 New Member

    Hey Guys,

    I am surprised this has not been raised already! If it has I am sorry, i have not been able to find the thread! I am now using a new domain name, and naturally want my server running ISPConfig to change to.

    So currently to get into my control panel I go to:

    BUT, I have changed my URL to be:

    I've gone to "Management > Settings" and changed the details there. I have changed all the defaults, such as DNS to reflect these changes. I have gone to /etc/hostname (<-- Debian user) and set the new domain, and have changed my reverse DNS with my bandwidth/IP provider.

    The problem is that when i login to the control panel using the new address some of the images don't load, throw SSL warnings, and some sections log me out. The reason for this is clear. Some parts of ISP config are still attempting to use the old domain (so sessions are not being maintaining). Before I go digging around to find out exactly which config file still has my old hostname in it I thought I'd ask here, as there may be a very easy solution staring me in the face.

    So just to recap... I have got a new domain, and have changed my machine's hostname. ISP config is still using the old domain for some parts of the control panel. Everything else has worked just fine, email, etc... =)
  2. martinfst

    martinfst ISPConfig Developer ISPConfig Developer

    If you run ISPC SSL protected, you need to regenerate the certificates. Same for Postfix and Courier.

    See for new ISPconfig cert. See the ISPConfig install guide for Postfix certs. imap for IMAP.

    You also need to check (I think) the hostnames in /root/ispconfig and /home/admispconfig. Do
    grep -r old_domain /root/ispconfig
    grep -r old_domain /home/admispconfig
    to look for matches.

    After you re-generated the certs, you need to delete the certs in your browser cache.

    Hope I didn't forget something.
  3. Xtreem1986

    Xtreem1986 New Member

    ah thanks for the quick reply! I'm just sifting through all the files still referencing my old domain and have found quite a few hidden email addresses and what nots I had over looked.

    I think I'll be able to get things working now, so thanks again
  4. Xtreem1986

    Xtreem1986 New Member

    Ok, absolutely no joy! I've changed every reference to my old domain (except the thousands of entries in my log files) and its still not working :(

    I'm going to have to have a look at the actual scripts that run the control panel and start tracing back where they are getting this URL from I think. I hope you guys write tidy code! ;)
  5. falko

    falko Super Moderator ISPConfig Developer

    Please change the hostname in /home/admispconfig/ispconfig/lib/ as well. Also check if your old hostname is in /root/ispconfig/httpd/conf/httpd.conf.
  6. Xtreem1986

    Xtreem1986 New Member

    Thanks for the tip Falko, but I realised that with all the logs and everything still showing my old domain a fresh install was in order! Kudos to ISPConfig for just how easy restoring backups is. I reinstalled debian and followed a perfect setup this time through. My backup MX servers kicked in perfectly, and all mail that was sent during the downtime got delievered. Put all the old sites and emails back in and all is working wonderfully. Total time was 3 hours and I did the work between 2 and 5 am... none of my customers noticed ;)

Share This Page