Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 19th, 2002, 06:36 AM
butcher butcher is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2001
Location: In a constant state of turmoil
Posts: 808 butcher User rank is Sergeant Major (2000 - 5000 Reputation Level)butcher User rank is Sergeant Major (2000 - 5000 Reputation Level)butcher User rank is Sergeant Major (2000 - 5000 Reputation Level)butcher User rank is Sergeant Major (2000 - 5000 Reputation Level)butcher User rank is Sergeant Major (2000 - 5000 Reputation Level)butcher User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 12 h 58 m 20 sec
Reputation Power: 34
Apache on LAN

Please forgive me if I'm in the wrong forum, or don't initially give you enough info because I'm in completly new waters here.

I have just recently networked a couple of computers with a DSL/Cable router. One of the boxes (Win2k) is running an Apache server that I'm not able to connect to from the other computer (Win XP). I can ping each computer from the other one, and I've been able to share files between them, so I don't *think* it's the network setup.

I've turned off the DHCP on the router and assigned static IP's to each box. 192.168.0.2 (Win2k box) and 192.168.0.3 (XP box).

Is there something I need to change in the Apache config file to get it to accept requests comming through the router?

Thanks in advance.

Reply With Quote
  #2  
Old February 19th, 2002, 07:47 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
You need to assign a hostname and domain name on both boxes, once you can ping yourself or the other by its FQDN, then you are ready.

Here is how to do that:

Win2k -> C:\WINNT\system32\Drivers\etc\hosts

WinXP ->
C:\WINNT\system32\Drivers\etc\hosts (if upgraded from win2k)
C:\Windows\system32\Drivers\etc\hosts

Put:

127.0.0.1 localhost.YOUR_DOMAIN_HERE localhost
192.168.0.2 win2k.YOUR_DOMAIN_HERE win2k
192.168.0.3 winxp.YOUR_DOMAIN_HERE winxp

Reply With Quote
  #3  
Old February 19th, 2002, 09:42 AM
butcher butcher is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2001
Location: In a constant state of turmoil
Posts: 808 butcher User rank is Sergeant Major (2000 - 5000 Reputation Level)butcher User rank is Sergeant Major (2000 - 5000 Reputation Level)butcher User rank is Sergeant Major (2000 - 5000 Reputation Level)butcher User rank is Sergeant Major (2000 - 5000 Reputation Level)butcher User rank is Sergeant Major (2000 - 5000 Reputation Level)butcher User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 12 h 58 m 20 sec
Reputation Power: 34
Thanks!

I can now ping them by name, and when I try to bring it up in the browser, I get the server root.

I currently have virtual hosts setup like this:

ServerName 127.0.0.1
UseCanonicalName Off
NameVirtualHost 127.0.0.1


<VirtualHost 127.0.0.1>
DocumentRoot C:\FoxServ/www/test.ponca
ServerName test.ponca.com
</VirtualHost>

<VirtualHost 127.0.0.1>
DocumentRoot C:\FoxServ/www/build.ponca
ServerName build.ponca.com
</VirtualHost>

Do I need to change my VirtualHosts from 127.0.0.1 to 192.168.0.2 or just make a new virtual host container for each one for the network?

Thanks again for your help.

Reply With Quote
  #4  
Old February 19th, 2002, 09:57 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
1) You need to remove ServerName 127.0.0.1
2) Set NameVirtualHost to *
3) Don't use forward+backward slashs on the path.
4) Set <VirtualHost *>

Reply With Quote
  #5  
Old February 19th, 2002, 10:13 AM
butcher butcher is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2001
Location: In a constant state of turmoil
Posts: 808 butcher User rank is Sergeant Major (2000 - 5000 Reputation Level)butcher User rank is Sergeant Major (2000 - 5000 Reputation Level)butcher User rank is Sergeant Major (2000 - 5000 Reputation Level)butcher User rank is Sergeant Major (2000 - 5000 Reputation Level)butcher User rank is Sergeant Major (2000 - 5000 Reputation Level)butcher User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 12 h 58 m 20 sec
Reputation Power: 34
Thanks freebsd

Just to make sure I haven't confused you in my own ignorance of these things, the line:

ServerName 127.0.0.1

Is in section 1 of the config file. Should I just comment it out?

Reply With Quote
  #6  
Old February 19th, 2002, 10:16 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> Is in section 1 of the config file

Yes, comment it out or remove that line. You don't need to define ServerName globally when your vhosts (within <VirtualHost> block) have their respective ServerName defined.

Reply With Quote
  #7  
Old February 19th, 2002, 11:53 AM
butcher butcher is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2001
Location: In a constant state of turmoil
Posts: 808 butcher User rank is Sergeant Major (2000 - 5000 Reputation Level)butcher User rank is Sergeant Major (2000 - 5000 Reputation Level)butcher User rank is Sergeant Major (2000 - 5000 Reputation Level)butcher User rank is Sergeant Major (2000 - 5000 Reputation Level)butcher User rank is Sergeant Major (2000 - 5000 Reputation Level)butcher User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 12 h 58 m 20 sec
Reputation Power: 34
Thanks for your patience freebsd but I still can't seem to get it right.

I have the hosts files set up the same on both machines

127.0.0.1 localhost
127.0.0.1 test.ponca.com
127.0.0.1 build.ponca.com
192.168.0.2 Dads.com Dads win2k
192.168.0.3 family.com family winxp


And I have made the changes you have suggested to the Apache config, i.e.,

Quote:
1) You need to remove ServerName 127.0.0.1
2) Set NameVirtualHost to *
3) Don't use forward+backward slashs on the path.
4) Set <VirtualHost *>


I can successfully ping family and family.com from the Win2k machine. I can successfully ping dads, dads.com, build.ponca.com, and teams.ponca.com from the WinXP machine.

The problem still remains... when I try to bring up one of the sites on the Win2k box (Dads) from the WinXP box (family) it doesn't work.

I don't know if this helps solve anything, but when I type http://dads.com into the browser on the WinXP box and check the properties of the page, under the general tab it says:

Quote:
Can't find Server

Address: res://C:\WINDOWS\System32
(URL) \shdoclc.dll/dnserror.htm#http://localhost/


BTW, I can pull up all of the sites in question (dads, dads.com, build.ponca.com, and test.ponca.com) with no problems on the box (Win2k) that the server is running on.

Thanks again!

Last edited by butcher : February 19th, 2002 at 12:00 PM.

Reply With Quote
  #8  
Old February 19th, 2002, 12:24 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
No, not that. You need to use the same local domain for all IPs, including 127.0.0.1 and 192.168.0.X.
Also, you can't set vhosts on loopback IP (127.0.0.1) because the other box can't reach it. Here is your hosts file:
Code:
127.0.0.1 localhost.ponca.com localhost
192.168.0.2 test.ponca.com test
192.168.0.2 build.ponca.com build
192.168.0.2 dads.ponca.com dads
192.168.0.2 win2k.ponca.com win2k
192.168.0.3 family.ponca.com family 
192.168.0.3 winxp.ponca.com winxp

This assumes you run Apache on 192.168.0.2.
Keep in mind, ponca.com resolves to 63.76.243.17 and it's a registered domain. You need to pick a nonexistence domain, that's why I was referring to local domain. If you use a registered domain, your will no longer be able to reach that site, because your hosts file intercept the requests and treat it as local.

Reply With Quote
  #9  
Old February 19th, 2002, 01:19 PM
butcher butcher is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2001
Location: In a constant state of turmoil
Posts: 808 butcher User rank is Sergeant Major (2000 - 5000 Reputation Level)butcher User rank is Sergeant Major (2000 - 5000 Reputation Level)butcher User rank is Sergeant Major (2000 - 5000 Reputation Level)butcher User rank is Sergeant Major (2000 - 5000 Reputation Level)butcher User rank is Sergeant Major (2000 - 5000 Reputation Level)butcher User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 12 h 58 m 20 sec
Reputation Power: 34
Thank you freebsd!!

I appreciate your time, patience, and great wealth of knowledge. Everything seems to be working fine now.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > Apache on LAN


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway