httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Kjeldsen" <pet...@lingualizer.net>
Subject [users@httpd] Vhosts not routed to the correct directory...
Date Mon, 03 May 2004 15:02:44 GMT
Okay it was a 50% mistake I intended to include the list as well but
forgot ;)

The server is up and running and the site should be accessible from the
internet but I can see that nothing at all shows now when I try
accessing the site via a dial-up connection to another ISP. 

The server is behind the X4 firewall/router and it forwards all requests
on port 80 to the server (with a static IP on the LAN) but even on the
LAN the server does not serve anything but blank pages...

Peter


-----Oprindelig meddelelse-----
Fra: Leif W [mailto:warp-9.9@usa.net] 
Sendt: 3. maj 2004 17:35
Til: peterk@lingualizer.net
Emne: Re: [users@httpd] Vhosts not ruted to the correct directory...

Hello,

You've mailed me off list, so the others didn't see this.  Not sure if
that was intended or by accident.  I'll reply to the other message that
was on the list, and include comments to some things I thought of
regarding this email, and what happens when I try going to your site,
which may or may not indicate some other weirdness, depending on if you
turned off your server, or if these hosnames are world-accessible, or
only behind a LAN, etc.

Leif

----- Original Message ----- 
From: "Peter Kjeldsen" <peterk@lingualizer.net>
To: <warp-9.9@usa.net>
Sent: Monday, May 03, 2004 6:14 AM
Subject: SV: [users@httpd] Vhosts not ruted to the correct directory...


> Hi Leif,
>
> Thank you for taking time to help me with this.
>
> I have added the domain www.lingualizer.net to the Vhosts.conf file as
> well and Boyle Owens directory permission suggestions, but now both
> sites www.lingualizer.net and www.cotman-university.com are blank.
>
> However, the lingualizer site was until these changes were implemented
> running Neomail from www.lingualizer.net/cgi-bin/neomail.pl, that does
> not work anymore and is to me an indication of the changes in
Vhost.conf
> is actually now in full force and diverting requests from the
directory
> /var/www/html, which were the previous default document root, but
where
> to?
>
> Regards
> Peter
> -----------------------------------------------------
>
> #Peter's additions for NameBasedHosting 2004/may/03
>
> #Top level - Deny access everywhere
> <Directory />
>  Deny from all
> </Directory>
>
> NameVirtualHost *
>
> <VirtualHost *:80>
>  ServerName www.lingualizer.net
>  DocumentRoot /var/www/html/lingualizer
>   #Allow access /var/www/html/lingualizer
>   <Directory "/var/www/html/lingualizer">
>     Allow from all
>   </Directory>
>  DirectoryIndex index.html
> </VirtualHost>
>
> <VirtualHost *:80>
>  ServerName www.cotman-university.com
>  DocumentRoot /var/www/html/cotman-university
>   #Allow access /var/www/html/cotman-university
>   <Directory "/var/www/html/cotman-university">
>     Allow from all
>   </Directory>
>  DirectoryIndex index.html
> </VirtualHost>
>
> --------------------------------------------------
> -----Oprindelig meddelelse-----
> Fra: Leif W [mailto:warp-9.9@usa.net]
> Sendt: 2. maj 2004 19:19
> Til: users@httpd.apache.org
> Emne: Re: [users@httpd] Vhosts not ruted to the correct directory...
>
> ----- Original Message ----- 
> From: "BAO RuiXian" <ruixian.bao@pp.inet.fi>
> To: <users@httpd.apache.org>
> Sent: Sunday, May 02, 2004 11:44 AM
> Subject: Re: [users@httpd] Vhosts not ruted to the correct
directory...
>
>
> >
> >
> > Peter Kjeldsen wrote:
> >
> > >[snip...]
> > >
> > >The default web dir is: /var/www/html
> > >The content of this dir you can see if you go to
> > >http://www.lingualizer.net
> > >
> > >My problem is when I wanted to add a vitualhost to my server it
still
> > >kept routing all request to the default site
> htt://www.lingualizer.net
> > >
> > >Both domains are in the DNS servers at ZoneEdit pointing to the
same
> IP
> > >so both domains show the same default content www.lingualizer.net
and
> > >www.cotman-university.com
> > >
> > >I then created a dir called cotman-university.com
> > >at /var/www/html/cotman-university and copied a tmp index file into
> it.
> > >
> > >Next I added the following to the file Vhosts.conf:
> > >
> > >Listen 80
> > >NameVirtualHost *
> > ><VirtualHost *>
> > >ServerName www.cotman-university.com
> > >DocumentRoot /var/www/html/cotman-university
> > >DirectoryIndex index.html
> > ></VirtualHost>
> > >
> > >However, the two domains are still mixed up, that is pointing to
the
> > >default /var/www/html...Why?
> > >
> > >
> > Did you mean the two domains points to /var/www/html/ or
> > /var/www/html/contman-univeristy/? If it is the former, then I guess
> > your Vhosts.conf is somehow not read by your Apache server. If on
the
> > other hand it is the latter, it is correct behaviour. When you are
> using
> > vhosts, no main server will be used. So, if you now use
> >
> > www.lingualizer.net, since there is no vhost for it, it will be
> directed to the first vhost, i.e. www.cotman-university.com
> >
> > Best
> >
> > Bao
>
> Oh yeah, what Bao said.  :-)  Forgot about that.  If you have a single
> VirtualHost defined, then it looks there.  If you have two defined,
but
> for some reason Apache doesn't match up the client-specified Host
header
> with one of your VirtualHost sections, it will go to the first defined
> NBVH.  This is what I called my catch-all default NBVH.  This may also
> be what isgoing on with your config.
>
> Also forgot to mention, use the same exact IP:port pairing for Listen,
> NameVirtualHost, and each VirtualHost section, *:80.  This way you're
> saying, "match any address this computer may be called from"... that
> means, when your dynamic IP changes, you won't have to update an IP in
> the config.  Normally for static IPs, you enter a specific IP.  But
the
> * means it will also match 127.0.0.1, and if you're on a LAN,
> 192.168.3.4 (or whatever the IP).  In my case, my server is behind a
> gateway which does port forwarding, so that even though the machine
> running Apache has no external IP address, it gets called with the
> external address.
>
> Leif
>
> P.S. Off topic: I wish it were possible to be more specific, and use
an
> IP/netmask combination rather than the "all or one" approach.  I'm not
> aware of any syntax which allows for multiple IP addresses or
> IP/netmask, but that would be nice too.  The all or one approach is a
> bit clumsy.
>
> > >And I have read the manual and I have tried the option in version
2.0
> > >so I am run dry for ideas. Any help is much appreciated!
> > >
> > >Kindest regards
> > >Peter
>
>
>
>
> ---------------------------------------------------------------------
> 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