hosts file
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Red Hat support > Red Hat Networking > hosts file




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    hosts file  
Marcel Bootsman


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-18-04 02:33 AM

Hello,

i am creating a detailed plan for setting up my RH9 machine as a web/mail
server.
It is going to host a domain, let's call it www.domain.com.
My current hosts file looks like this:

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1        localhost.localdomain localhost servername

where servername is the name of the machine.

Now what changes would I have to make if i am going to have the domain.com
point to this machine?
thanks !








[ Post a follow-up to this message ]



    Re: hosts file  
Alexander Dalloz


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-18-04 07:34 AM

On Wed, 18 Feb 2004 11:20:46 +0100 Marcel Bootsman wrote:

> Hello,
>
> i am creating a detailed plan for setting up my RH9 machine as a web/mail
> server.
> It is going to host a domain, let's call it www.domain.com.
> My current hosts file looks like this:
>
> # Do not remove the following line, or various programs
> # that require network functionality will fail.
> 127.0.0.1        localhost.localdomain localhost servername
>
> where servername is the name of the machine.
>
> Now what changes would I have to make if i am going to have the domain.com
> point to this machine?
> thanks !

You need to set up a proper DNS zone for your domain on the DNS server
responsible for the domain.

The /etc/hosts file you should change to

127.0.0.1        localhost.localdomain localhost
123.123.123.4    host.domain.com       host


Alexander


--
Alexander Dalloz | Enger, Germany
PGP key valid: made 13.07.1999
PGP fingerprint: 2307 88FD 2D41 038E 7416  14CD E197 6E88 ED69 5653






[ Post a follow-up to this message ]



    Re: hosts file  
Charles LaCour


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-18-04 07:33 PM

Marcel Bootsman wrote:
> Hello,
>
> i am creating a detailed plan for setting up my RH9 machine as a web/mail
> server.
> It is going to host a domain, let's call it www.domain.com.
> My current hosts file looks like this:
>
> # Do not remove the following line, or various programs
> # that require network functionality will fail.
> 127.0.0.1        localhost.localdomain localhost servername
>
> where servername is the name of the machine.
>
> Now what changes would I have to make if i am going to have the domain.com
> point to this machine?
> thanks !
>
>
>
The host file on your machine is for name and IP resolution on your
machine only.  It has no relation to other computers resolving your
computers name.

There are a number of things that need to be done.  First of all where
is this computer to be available from?  Internal network or Internet or
both?  What is going to be the method of name resolution?  If it is
going to be accessed from the Internet you will need the name
www.domain.com to resolve to the IP address for the server or the IP
address on the firewall that will pass the requests to it.

In any case I would add to your hosts file a line with the IP address of
your computer with the name you want for the computer.  For example:
192.168.1.100	servername.domain.com	servername	www.domain.com

I would leave the loopback entry in your host file alone, it should be:
127.0.0.1 	localhost.localdomain   localhost

To configure what your RH9 computer shows as your hostname take a look
at the file /usr/share/doc/initscripts-*/sysconfig.txt and look at the
info on the /etc/sysconfig/network and
/etc/sysconfig/network-scripts/ifcfg-<interface-name> files.

For name resolution look at the hosts entry in the /etc/nsswitch.conf
file.   And look at resolv.conf.  You should probably do a man on both
for the details.

If you do not already have a DNS server you will need to set up DNS as
well.  This is beyond what I am prepared to write about.  You may be
able to get it functioning with bindconf but if you are going to host
your own DNS I would invest on a good book or two (O'Reilly's book on
DNS & Bind is one of my favorites).

If it is going to be accessed through a firewall or a router with NAT
you will have to configure access through that as well.

If you are going to set up sendmail for your MTA I would be very careful
in configuring it since it is easy to leave it open as a spam relay.

If you could be a little more specific about what you are trying to do
and what the environment that the server is going into I may be able to
be more helpful.

--
Thanks
Charles LaCour





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 03:08 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register