1753307 Members
6405 Online
108792 Solutions
New Discussion юеВ

Re: dns

 
Inter_1
Frequent Advisor

dns

I have my apache server and i can open the page http://localhost , but my hostname is omega.mycompany.com. How can I open the apache by typing http://omega.mycomapny.com

Thanks
Taualnt
I like to fix things.
7 REPLIES 7
Ivan Ferreira
Honored Contributor

Re: dns

If you already have a DNS server in you network, add an A record for your server in the zone file. If you don't already have DNS installed, see this HOWTO:

http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch18_:_Configuring_DNS

Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Inter_1
Frequent Advisor

Re: dns

what, if i would like no the dns but to access my webpages not to use http://localhost but http://omega for that server.

thanks
I like to fix things.
Ivan Ferreira
Honored Contributor

Re: dns

You can edit /etc/hosts file on each client that you want that that occurs. Add an entry like this:

...

Example:

192.168.1.1 omega.mycompany.com omega webserver


Now, you can access by entering in the URL:

http://omega.mycompany.com
http://omega
http://webserver

And so on.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Ivan Ferreira
Honored Contributor

Re: dns

If you have some windows clients, same rules apply but the file is located at:

c:\winnt\system32\drivers\etc
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Inter_1
Frequent Advisor

Re: dns

I now that. But I can access it only from the server not from any pc in my lan.

Thanks
I like to fix things.
Andrew Bruce
Valued Contributor

Re: dns

There are only two ways (I think!) you can get all the processors in your lan to talk to a box using hostname.domainname

1. Set up an entry in the host file ON EACH COMPUTER that points to the IP address of the box you are refering to.

2. Set up a DNS service on one box that all the other boxes use.

Use Ivan's answers to set one of these up.

The reason for this, as I'm sure you know, is that each box needs to know how to translate someserver.yourdomain into a numerical IP address.

Either the box is configured to look in its host file, or it is configured to go ask another box (using IP address).

HTH.

Regards,

Andy Bruce
I Love it when a plan comes together!
Steven E. Protter
Exalted Contributor

Re: dns

Shalom,

Simply adding omega.mycompany.com to the topline in /etc/hosts will do the job.

Or adding an entry for it into your central DNS server.

Just make sure if you use /etc/hosts that files,dns is the host resolution order in /etc/resolv.conf

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com