LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-27-2009, 10:38 AM   #1
mrotsliah
LQ Newbie
 
Registered: May 2009
Posts: 25

Rep: Reputation: 15
Question about changing hostname, it does not change the url


I have Ubuntu Server 8.04. I use to have the hostname oldhostname and url oldhostname.whatever.com. I am changing hosename to newhostname by following the instructions

http://codeghar.wordpress.com/2007/1...ame-in-ubuntu/

So, I changed the hostname in both /etc/hosts and /etc/hostname and restarted /etc/init.d/hostname.sh, but my server still loads the webpage at oldhostname.whatever.com instead of at newhostname.whatever.com. Typing hostname at the prompt yields "newhostname" for the current hostname.

The instructions above use /etc/init.d/network. I only have /etc/init.d/networking. I don't know if there is a difference in the two. I ran that, but nothing changed.

Any suggestions?

Thanks.
 
Old 08-27-2009, 10:53 AM   #2
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
You need to change the DNS records. Do you have administrative control for your domain name on the name server?

Regards,

Fordeck
 
Old 08-27-2009, 11:04 AM   #3
mrotsliah
LQ Newbie
 
Registered: May 2009
Posts: 25

Original Poster
Rep: Reputation: 15
I am the administrator on the machine that I am trying to change the hostname, but I have no control over the whatever.com part of the url or any of the DNS servers. I only have control of the hostname. I am on a network, though, and it does seem to recognize that I have a machine with the initial hostname. I initially set up this server with the hostname oldhostname without having to talk with the people running the DNS servers. The network just worked with me and allowed oldhostname.whatever.com to reference my server.
 
Old 08-27-2009, 12:26 PM   #4
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
DNS maps a name to an IP address not a hostname. For example compare the output of these two commands:

dig oldhostname.whatever.com

dig newhostname.whatever.com

More than likely you will see an 'A' record for oldhostname.whatever.com but not for newhostname.whatever.com. Of course you would have to replace those with the actual names you are trying to query.

Regards,

Fordeck
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
after hostname change, syslogd still output previous hostname to messages file tiger2000 Linux - General 3 07-22-2009 09:36 PM
How to change hostname ? - changing localhost Rommeo Slackware 15 01-01-2008 01:47 AM
Question on changing hostname satimis Linux - Networking 6 11-13-2007 10:43 PM
apache - changing URL Timur Linux - Server 20 10-13-2006 01:07 AM
Apache -- Changing requested URL to another name AnthonyM Linux - General 0 09-24-2004 07:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration