httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan....@chi.ddb.com
Subject RE: [users@httpd] Name based virtual server problems
Date Tue, 13 Jan 2004 17:50:19 GMT




Thanks for you help on this!

I forgot to mention we needed to add an allowed IP range too.  I'm not
getting output as far as where the offending directive is in the conf file.

Here is what we have now:

NameVirtualHost 172.20.10.138:80

<VirtualHost 172.20.10.138>
 ServerName www.ddbchi.com
DocumentRoot /htdocs/ddbchi
 ...
</VirtualHost>

<VirtualHost 172.20.10.138>
 ServerName www.cultureddb.com
 DocumentRoot /htdocs/
Order allow, deny
 Allow from 172.20.0.0/255.255.0.0 172.90.0.0/255.255.0.0 172.36.16.0
/255.255.0.0 172.36.20.0/255.255.0.0 172.37.16.0/255.255.0.0 172.37.20.0
/255.255.0.0 172.38.16.0/255.255.0.0 172.38.20.0/255.255.0.0 172.39.16.0
/255.255.0.0 172.39.20.0/255.255.0.0 172.40.16.0/255.255.0.0 172.40.20.0
/255.255.0.0 172.41.16.0/255.255.0.0 172.41.20.0/255.255.0.0 172.42.16.0
/255.255.0.0 172.42.20.0/255.255.0.0 64.60.95.131/255.255.255.0
64.60.95.138/255.255.255.0
</Directory>
  ...
</VirtualHost>


                                                                           
             "Boyle Owen"                                                  
             <Owen.Boyle@swx.c                                             
             om>                                                        To 
                                       <users@httpd.apache.org>            
             01/13/04 02:15 AM                                          cc 
                                                                           
                                                                   Subject 
             Please respond to         RE: [users@httpd] Name based        
             users@httpd.apach         virtual server problems             
                   e.org                                                   
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




> -----Original Message-----
> From: Matt Pearce [mailto:mattpearce@swiftdsl.com.au]
>
> > NameVirtualHost www.ddbchi.com
>
> I believe this should be NameVirtualHost 255.255.255.255:80 (obviously
> change it to the ip addy of your  server).

To exapnd a little on what Matt says, the NameVirtualHost directive
usually takes an IP address as an argument. It will "work" if you put a
domain-name because apache is smart enough to resolve the name to an IP
for you, but there are at least two reasons why you shouldn't do this:

- if apache has to look up the IP address you've got an extra step at
startup which slows things down and, more importantly, makes apache
dependent on DNS working. If your local DNS fails, apache could fail to
start.
- the whole point of NVH is that it allows you to say "this IP has many
names" which is a logical statement. If you give NVH a name as an
argument, it translates to "this name has many names" which sounds like
nonsense and is a lot harder to understand, document and maintain.

Regarding your specific case, assuming you have only one IP address, I
would put both your sites in VH containers (forget about the idea of a
"main" site). Like this:

NVH 172.20.10.138

<VirtualHost 172.20.10.138>
  ServerName www.ddbchi.com
  DocumentRoot /htdocs/ddbchi
  ...
</VirtualHost>

<VirtualHost 172.20.10.138>
  ServerName www.culturedb.com
  DocumentRoot /htdocs/culturedb
  ...
</VirtualHost>


About some of your other directives:

> Listen 80

This says "listen to port 80 on all active interfaces (usually just IP &
localhost)"

> Listen 172.20.10.138:80

This says "listen to port 80 on 172.20.10.138 only"

So this supersedes the previous one.

> BindAddress www.cultureddb.com

This says "ask DNS what IP address www.cultureddb.com resolves to, then
listen to port 80 on that address".

This may or may not conflict with the others and, in any case, is a
deprecated directive (superseded by Listen). Just remove it.

In summary, just put:

Listen 172.20.10.138:80

immediately after the NVH directive.

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored.


>
> Matt.
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP
> Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
Diese E-mail ist eine private und persönliche Kommunikation. Sie hat
keinen Bezug zur Börsen- bzw. Geschäftstätigkeit der SWX Gruppe. This
e-mail is of a private and personal nature. It is not related to the
exchange or business activities of the SWX Group. Le présent e-mail est
un message privé et personnel, sans rapport avec l'activité boursière du
Groupe SWX.

This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please notify the sender urgently
and then immediately delete the message and any copies of it from your
system. Please also immediately destroy any hardcopies of the message.
You must not, directly or indirectly, use, disclose, distribute, print,
or copy any part of this message if you are not the intended recipient.
The sender's company reserves the right to monitor all e-mail
communications through their networks. Any views expressed in this
message are those of the individual sender, except where the message
states otherwise and the sender is authorised to state them to be the
views of the sender's company.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message