How to change hostname for a running server?

Kaz Wolfe

Well-known member
Joined
Jul 7, 2016
Messages
466
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
Joined
Jul 7, 2016
Messages
466
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
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.
 

AlbaHost

Well-known member
Joined
Jan 18, 2017
Messages
395
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
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.
 
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,
 
Latest Threads
Replies
1
Views
17
Replies
0
Views
11
Replies
3
Views
21
  • Deleted
  • Deleted by fwh
Replies
0
Views
4
Replies
0
Views
33
Similar Threads
Replies
2
Views
1,480
Replies
1
Views
988
Replies
5
Views
1,928
Replies
14
Views
7,128

Latest postsNew threads

Latest Hosting OffersNew Reviews

Sponsors

Latest Blog ArticlesMost Viewed Threads

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