br3ach

Active Member
Feb 21, 2004
32
0
156
UK
Hi

I am wondering if it will cause any problems if I cahnge my server hostname?

What else would I have to change to get the name changed?

It is currently set to

xxxxxxxx1.xxxxxxx.co.uk

if I want this as something else I can change it in edit setup, but is this going to cause anything else to stop working?

Cheers
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
Go on, have a guess
It shouldn't cause any problems. Make sure that you have a DNS entry for the new hostname before you configure it in WHM.
 

azn_romeo_4u

Active Member
Jun 1, 2005
42
1
158
Can I ask, what is a hostname?

"* Enter the hostname of the primary nameserver (normally, the name of this server) you wish to use when creating new domains or subdomains."


On whm, when it ask that, what does that mean? Can I pick any nameserver I want? I mean any nameserver? Like out of the blue? Or does something have to happen?
 

azn_romeo_4u

Active Member
Jun 1, 2005
42
1
158
I'm quite confuse on what is the hostname.

"It is important to choose a hostname that you will not be using for any account. You should choose something that will be socially accpetable, as it will appear in all mail headers. Your hostname must be a FQDN. In english, A hostname should consist of a name and a domain name. All valid hostnames should have 2 dots in them. Hostnames should never begin with "www". "


On the page where it says the above, so the host name is basically a domain name? And the domain name can be rigister by any rigistra?
 

RAIS2

Well-Known Member
Jul 16, 2004
186
0
166
Here is an example Hostname:

whatever.domain.com

The Hostname is like the name of the server. It shouldn't be created as an account on the server, as it is the main name for the server. It can be used to uniquely identify your server ( ie mail headers )

Here are some of the ways you will see the Hostname ( as admin ):

In a web browser:
http://whatever.domain.com:2086 - which is the WHM for the server ( WHM can also be accessed other ways )

In an SSH client
[email protected] [~]# - which is the command line while connected to the server

Hope That Helps.
 

KMK Enterprises

Well-Known Member
Feb 7, 2005
52
0
156
azn_romeo_4u said:
I'm quite confuse on what is the hostname...so the host name is basically a domain name? And the domain name can be rigister by any rigistra?
Yes, you start by purchasing a domain name from a registrar: domain.com

You make it a hostname in WHM, by adding something (besides www) in front of it: whatever.domain.com - example: server.domain.com

azn_romeo_4u said:
Can I pick any nameserver I want? I mean any nameserver? Like out of the blue? Or does something have to happen?
No. Nameservers also start with a registered domain name. You can't just make them up. You can however, use the same domain name you used for your hostname. Nameserver examples: ns1.domain.com or dns1.domain.com. A domain which will be used as a nameserver, requires special information to be added to the registration records at your registrar. This information is sometimes called host records, or domain server records - it differs with different registrars. These records contain the names you will be calling your nameservers (ns1.domain.com and ns2.domain.com) and the IP addresses you assign to your nameservers.
 

t9clkclnr

Well-Known Member
Jun 11, 2004
254
0
166
Southern California
does it matter if...

does it matter if I've changed the primary and secondary dns's for the server if I still have those original dns's listed as valid DNS's in "Manage Nameserver IP's".

example:

I've had this:
ns1.domain1.com < set as primary
ns2.domain1.com < set as secondary

and I've added these:
ns1.domain2.com < want to make primary
ns2.domain2.com < want to make secondary

now in WHM primary & secondary nameservers I want to change ns1.domain1.com & ns2.domain1.com both to the "domain2" DNS's.

I assume that since I'm not removing the original ns1 & ns2 from the server that no sites would go down, nor need to have their DNS's updated at their respective registrars..
 

Vatoloco

Well-Known Member
Jun 21, 2004
99
0
166
Changing Hostname

Here's the guide I've always used to make sure my hostname is changed correctly:

http://forums.ev1servers.net/showthread.php?threadid=22882

disoft said:
I thought I'd start this HOW-TO for changing the CPanel hostname. Please let me have your input and maybe we can make this thread a 'definitive' HOW-TO.

-----------------------------

1. Change Hostname In WHM
Select Change Hostname from the Server Setup section on the menu to the left.

Enter the new hostname in the box and click 'Change'. Hostnames should have two dots in them and should be setup as if they're a subdomain of your server's main domain name. So, if your server's main domain is mybox.com, your hostname could be something like server01.mybox.com.

WHM then prompts you to add an 'A Entry for your hostname' if you don't already have one (see bnext point)

2. Add an 'A' Entry
You can do this by going to the DNS Functions area of the left menu and selecting Add an A Entry for your Hostname. It will ask you to confirm the details: press Add the entry to do so.

3. Manual Checks
Now this didn't work fully when we did it, so we had to check some stuff manually (none, some or all of these may need ameding in your environment). SSH to your server and do the following:

'hosts' file
Type: pico /etc/hosts and check that the entries are as follows -

127.0.0.1 localhost
xxx.xxx.xxx.xxx server01.mybox.com server01

- replacing xxx.xxx.xxx.xxx with your server's IP address and adding your hostname after it.

Hit CTRL+X and reply 'y' to exit pico and save the file.

Apache
Type: pico /etc/httpd/conf/httpd.conf, scroll down and find the ServerName entry and make sure your fully qualified hostname (i.e. server01.mybox.com) is specified after it.

While you're there, you may want to change the ServerAdmin e-mail (just above the ServerName) too.

Hit CTRL+X and reply 'y' to exit pico and save the file.

wwwacct.conf
Type: pico /etc/wwwacct.conf, scroll down and find the HOST entry and make sure your fully qualified hostname (i.e. server01.mybox.com) is specified after it.

Hit CTRL+X and reply 'y' to exit pico and save the file.

resolv.conf
Type: pico /etc/resolv.conf, and check that the first two lines read as follows -

domain mybox.com
search mybox.com

Replacing mybox.com with your server's primary domain name and adding your own nameservers to the file.

Hit CTRL+X and reply 'y' to exit pico and save the file.

network
Type: pico /etc/sysconfig/network, and check that HOSTNAME line specifies your host name.

Hit CTRL+X and reply 'y' to exit pico and save the file.

--------------------

You may need to reboot your box to make hostname changes take effect.
 

lloyd_tennison

Well-Known Member
Mar 12, 2004
697
1
168
You are missing one of the most important steps. You need to have your datacenter setup the reverse IP for your new server name. If not, some people block your email, etc., etc.

So your main IP address will directly resolve to your hostname and your hostname will directly resolve to your ip. Otherwise it is called an mismatch which is not good.
 

digitard

Well-Known Member
Aug 13, 2004
70
0
156
Yeah,
I had the same issue.

I originally named my box server1.website.com ... after realizing I no longer wanted people to know they were on 'box1', 'box2', etc instead just a specificly named box I had to go through the steps listed above and change everything and then go into my hosts control panel and reset my info with them too to re-route everything.

It was tedious... but it worked in the longrun.