Hi everyone,
First of all good day to everyone.
I am a newbie, and having an issue which needs to get resolved immediately.
I have a site running on the linux computer in LAN. This site has to be accessed in the LAN using the host name. For example, the IP of the system running the site is 192.168.0.99 and i want to access the site by typing http://hostname/sitename in the address bar.
As someone suggested, I changed the /etc/hosts file by adding the line 192.168.0.99 sitename
The old file contains the following:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
The new one looks like the following:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.0.99 hostname
now i am able to access the site by typing http://hostname/sitename on browser on server, but not able to access the site from other computers with that url. I get the error server not available.
Please someone suggest to fix this. It is very urgent.
Thanks in advance..
Assigning host name
Assigning host name
Last edited by itdev on 2015/10/02 11:58:12, edited 1 time in total.
Re: Assigning host name
You would need to add that entry to the hosts file on all the machines you wish to access the server from. Or you need to add it to your DNS server.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: Assigning host name
Thanks for replying soon.
Except one computer hosting the site is running centos, all the other computers are running windows.
so where can I find that file on windows machine.Please help me (Also please give the same of code that has to be inserted..).
If I have a LAN of 100 computers, what will be the procedure for configuring the DNS?
Thanks in advance!
Except one computer hosting the site is running centos, all the other computers are running windows.
so where can I find that file on windows machine.Please help me (Also please give the same of code that has to be inserted..).
If I have a LAN of 100 computers, what will be the procedure for configuring the DNS?
Thanks in advance!
-
- Posts: 1522
- Joined: 2014/05/21 20:16:00
- Location: Central New York, USA
Re: Assigning host name
C:\Windows\System32\drivers\etc
Re: Assigning host name
Your system admin should know the details of your DNS server (if you have one that you control).
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: Assigning host name
Just in case the Win boxen are locked down and you can't edit the hosts file, remember that you can always use bare IP addresses in URLs: http://192.168.0.99/sitename