How to change hostname for a running server?

Kaz Wolfe

Well-known member
Joined
Jul 7, 2016
Messages
410
Best answers
0
Ratings
32
Points
28
#1
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
410
Best answers
0
Ratings
32
Points
28
#3
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?
 
Joined
Jun 10, 2016
Messages
17
Best answers
0
Ratings
2
Points
3
#8
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
396
Best answers
1
Ratings
110 6
Points
43
#10
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.
 
Joined
Jun 3, 2018
Messages
35
Best answers
0
Ratings
9 1
Points
8
#13
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
Best answers
1
Ratings
24 7
Points
8
#14
open a shell to your DA box and

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

Regards,
 
Similar Threads
Replies
2
Views
1,315
Replies
1
Views
845
Replies
5
Views
1,587
Replies
14
Views
6,252

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