Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums

Go Back   Code Forums > Systems > Linux / BSD / OS X

Reply
 
LinkBack Thread Tools Display Modes
Old 03-16-2006, 03:04 PM   #1 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,505
sde is on a distinguished road
running apache on a local network

i have a friend who is running apache on a local network and is having trouble with virtual hosts.

he has the virutal host setup so it works locally, but when you try to connect from another system, it just goes to the apache root.

example:
Code:
<VirtualHost *:80>
  DocumentRoot /home/somedood/site_dir/
  ServerName dood
 </VirtualHost>
when he types http://dood/ locally, it pulls up the site.

now, he goes to another system, adds dood to his hosts file, and then when he browses to http://dood/ , it loads the apache document root, not the virtual host.

what else needs to be configured to get this to work?
sde is offline   Reply With Quote
Old 03-16-2006, 03:25 PM   #2 (permalink)
DJMaze
Senior Contributor
 
DJMaze's Avatar
 
Join Date: Mar 2005
Posts: 705
DJMaze is on a distinguished road
do both systems use his IP instead of 127.0.0.1 ?
DJMaze is offline   Reply With Quote
Old 03-16-2006, 03:33 PM   #3 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,505
sde is on a distinguished road
the apache system has his local IP. does it need to be the external IP?
sde is offline   Reply With Quote
Old 03-16-2006, 03:51 PM   #4 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,166
Belisarius is on a distinguished road
I've never really understood how virutal servers work - wouldn't Apache need to interpret a DNS request?
__________________
GitS
Belisarius is offline   Reply With Quote
Old 03-16-2006, 03:52 PM   #5 (permalink)
teknomage1
Jack of all trades
 
teknomage1's Avatar
 
Join Date: Feb 2005
Location: Los Angeles
Posts: 598
teknomage1 is on a distinguished road
Send a message via AIM to teknomage1
Has he restarted Apache since he changed the config?
__________________
Stop intellectual property from infringing on me
teknomage1 is offline   Reply With Quote
Old 03-16-2006, 04:53 PM   #6 (permalink)
DJMaze
Senior Contributor
 
DJMaze's Avatar
 
Join Date: Mar 2005
Posts: 705
DJMaze is on a distinguished road
Quote:
Originally Posted by sde
Does it need to be the external IP?
For testing purposes.... YES
That way you can test if it realy listens and reacts on 192.168.x.x or whateffa since 127.0.0.1 is local.

This is based on the firewall setup to allow 0.0.0.0 (any) or nothing.
DJMaze is offline   Reply With Quote
Old 03-17-2006, 07:54 AM   #7 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,720
redhead is on a distinguished road
Quote:
wouldn't Apache need to interpret a DNS request?
Nope, it only looks at the HTTP-GET request, this will still hold the name provided, instead of the IP.
But apache needs to know that a virtual host configuration exists for another IP than localhost.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
China's New Generation Of Ipv9 Network Technology Ready redhead Code Newbie News 0 07-05-2004 05:13 AM
Inheriting a badly setup network. DesertWolf Lounge 3 04-18-2004 09:18 PM
School District Fails Network Security sde Code Newbie News 0 07-03-2003 03:12 PM


All times are GMT -8. The time now is 01:41 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting