Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

URL for website on server on local LAN.

Status
Not open for further replies.

louarnold

Programmer
Oct 13, 2010
9
CA
I'm running a CentOS 6.2 machine connected to a Windows machine on a LAN that accesses the internet via a router. The Linux system has Drupal installed and several web sites with a virtual host for each. Working in the Linux machine, I can access everything without a problem. But I can't seem to get the proper URL to access the web sites from the Windows machine.

I can access the basic Apache server with " - I get the default index.html page, but what do I enter to get the Drupal web site " that I use at the Linux machine?
I've tried:
but I always get a page-not-found error.
If I try: "...shoe. I get the error "The connection to the server was reset while the page was loading.
 
If you can access everything from localhost then the problem is not with apache. You need to forward all http (port 80) traffic to the lan ip of the server.
 
This is probably that your Windows machine is going to the external DNS for the URL

Try adding a IP address -> hostname entry into your windows machine hosts file ...

Code:
127.0.0.1      localhost
123.234.213.2  [URL unfurl="true"]www.xxx.ws[/URL] xxx.ws
111.222.111.3  some.other.host.ws

OBVIOUSLY use your real Linux machines @IP

Remember to remove them later when not needed.

Laurie
 
You are better using a non-existent TLD in your Vhosts\hosts file entry. I use websitename.lcl as the vhost names for my local Centos dev box.

That way it cannot affect any external routing from your machine.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
@ RythmAce: Sorry, that didn't work. Simply substituting the IP address for the host name (Shoe) doesn't do it.

@ Tarn. Your solution worked. Setting "192.....001 in the hosts file in Windows was the only thing needed. Thereafter, I simply had to enter the website name in the browser's URL and the web site came up.

@ ChrisHirst: Yes, the non-existant TLD was intended. I just didn't find out that the ".ws" was already taken until much later. It didn't really matter because the webiste itself doesn't exist in the outside world.

Thank you all for your time.
 
It's not so much as it existing in the real world as the hosts file only affects the one machine's DNS resolution. It's that using a 'real' TLD could stop that machine from accessing external hostnames using that TLD.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Oh, OK. Why am I the only one who missed the part about this not being real life? ;-)
 
@ RhythmAce: Well, I really didn't explain it too clearly. Both computers are connected to the LAN side of the router. As yet, there is no registered domain name. I'm in a testing phase at this time.
 
My problem is solved. Can someone please mark the thread accordingly. I don't know how.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top