LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-09-2008, 11:57 PM   #1
umwai
Member
 
Registered: May 2008
Location: Sri Lanka
Distribution: Ubuntu
Posts: 57
Blog Entries: 1

Rep: Reputation: 16
Cool changing localhost


I want to change localhost to a name like www.myname.com
how to do that in ubuntu
 
Old 11-10-2008, 12:11 AM   #2
n03x3c
Member
 
Registered: Aug 2008
Location: India
Distribution: Fedora, RedHat
Posts: 101

Rep: Reputation: 17
Either you edit your /etc/hosts file if you want some other name than localhost / localhost.localdomain for your 127.0.0.1 IP.

Code:
127.0.0.1        localhost    localhost.localdomain    your.host.name
Other way is to edit zones in your local DNS server. Or if you just want to set hostname, you can edit /etc/sysconfig/network file and add entry like this.

Code:
HOSTNAME=your.host.com
 
Old 11-10-2008, 07:29 AM   #3
salter
Member
 
Registered: Oct 2008
Posts: 100

Rep: Reputation: 15
It is usually good to keep the name 'localhost', so that you know when you are accessing local web server. The IP 127.0.0.1 will anyway point to the local web server.

I assume that you want to set up a public web server and are confused that your own webpages show up under localhost.

To allow for public web access you have to register the domain name, unless you want to give access IP-number. You then have to set up a virtual host in your local web server for that given domain name. If accessed by IP-number, the first virtual domain will be shown.

For virtual domains see the documentation of your web server.

Last edited by Tinkster; 10-30-2010 at 06:17 PM.
 
  


Reply

Tags
localhost


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Changing from localhost? purelithium Mandriva 3 11-08-2005 08:52 PM
Changing localhost name aje Linux - General 1 11-11-2004 11:23 PM
Changing the localhost name in RH9 mosh Linux - Software 1 06-17-2004 11:21 AM
Changing name from localhost jbraum Mandriva 9 01-17-2004 02:04 AM
changing localhost endfx Linux - Software 6 05-15-2003 06:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:08 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration