How to change hostname for a running server?

Kaz Wolfe

Well-known member
Registered
Joined
Jul 7, 2016
Messages
604
Points
28
I have a server running directadmin and having 5 domain name on it. Now I want to change the domain that using to create hostname and dns for this server but I am afraid that websites running under this server will have downtimes. I don't want that, how to change hostname for a running server without downtimes for other websites running in it?
 

Kaz Wolfe

Well-known member
Registered
Joined
Jul 7, 2016
Messages
604
Points
28
Thanks but I think changing hostname and reboot the server will lead problems for websites running under this server because when I installed directadmin, I use the domain to create DNS and other thing. I think I need to change more things and that will be impossible.

Should I move all websites under this server and start moving main domain from this server to a new server and back to install hosting control panel with a new domain and move websites back?
 

ikoula

Member
Registered
Joined
Jun 10, 2016
Messages
17
Points
3
As you were talking about migration on monday i was wondering if you were not encountering a site name issue.
If you wanted to change vhost name you could create an alias instead, in this case the website would be reachable on both domain names.

But If you really want to change server's hostname you have no choice but reboot server, it is something system can only update at booting.

And if you can't stop the server then yes you should process to a soft migration (without interruption) of all the server.
I am no DirectAdmin expert but there should be a migration tool.
 

Kaz Wolfe

Well-known member
Registered
Joined
Jul 7, 2016
Messages
604
Points
28
Kaz Wolfe
I am not. I think it will cause problems or downtime for sites running on my server when changing host name. I have not asked DA support but I will do soon.
 

AlbaHost

Well-known member
Moderator
Hosting Provider
Joined
Jan 18, 2017
Messages
775
Points
43
What OS do you use? And i don't know why do anyone thing that changing a hostname require reboot/restart the server? You can do that without rebooting your server.
 

panamaserver

Member
Registered
Joined
Jun 3, 2018
Messages
35
Points
8
Hope this helps:
  1. Login to DirectAdmin as the admin user.
  2. Click on the Administrator Settings link.
  3. Change the value in the "Server's Hostname" field to whatever you want the hostname to be.
  4. Click the Save button at the bottom to save your changes.
 

webalternative

Member
Registered
Joined
Mar 18, 2018
Messages
39
Points
8
open a shell to your DA box and

Code:
cd /usr/local/directadmin/scripts
./hostname.sh <hostname>

Regards,
 
Older Threads
Similar Threads
Replies
2
Views
2,293
Replies
1
Views
1,904
Replies
5
Views
3,874
Replies
14
Views
12,032

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top