Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 87229 invoked from network); 3 May 2004 15:55:49 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 3 May 2004 15:55:49 -0000 Received: (qmail 14002 invoked by uid 500); 3 May 2004 15:55:24 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 13987 invoked by uid 500); 3 May 2004 15:55:24 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 13947 invoked from network); 3 May 2004 15:55:23 -0000 Received: from unknown (HELO im-gonna.kicks-ass.net) (66.189.41.6) by daedalus.apache.org with SMTP; 3 May 2004 15:55:23 -0000 Received: from enterprise ([192.168.1.102] ident=warp9pnt9) by defiant with smtp (Exim 4.31) id 1BKfmw-0002nf-6m; Mon, 03 May 2004 11:55:26 -0400 Message-ID: <00b901c43127$16c596b0$6601a8c0@enterprise> From: "Leif W" To: , References: <001001c4311f$b67d7900$0800000a@Peterk> Date: Mon, 3 May 2004 11:55:42 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Subject: Re: [users@httpd] Vhosts not routed to the correct directory... X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ----- Original Message ----- From: "Peter Kjeldsen" To: Sent: Monday, May 03, 2004 11:02 AM Subject: [users@httpd] Vhosts not routed to the correct directory... [snip] > -----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... [snip] > ----- Original Message ----- > From: "Peter Kjeldsen" > To: > 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. When I go to http://www.lingualizer.net/ I get a "Bad Request" error, telling me I am trying to speak HTTP over HTTPS. My browser is looking at port 80. But the server string at the footer of the error page says "Apache-AdvancedExtranetServer/2.0.47 (Mandrake Linux/1.6.91mdk) mod_perl/1.99_08 Perl/v5.8.0 mod_ssl/2.0.47 OpenSSL/0.9.7a PHP/4.3.1 Server at mail.lingualizer.net Port 443" First, why is it configured to talk HTTPS on port 80? Second, why is it calling itself mail.lingualizer.net when that isn't what I typed in, and that isn't even in the DNS? Third, why does it think I am talking to port 443? Maybe you have forwarded port 80 to port 443 by mistake? If I then try to type https://www.lingualizer.net/ I get a connection refused, which says it's either blocked by the firewall, or no Listen 443 directive in the configs (httpd.conf, ssl.conf, vhosts section). First thing I would do is check your firewall. Double check it. Tripple check it. Second thing I would do, is look in your log files, and see if you see your IP address. Caveat: you have no log files specified for each VirtualHost, so it's all going to the main log files, which isn't good for troubleshooting, especially since the default "Common" and "Combined" log formats do not include the virtual host (%v in the LogFormat string). Also, all your errors are going into the same log file, and there's no way to specify a virtual host that I am aware of. If you're using a relatively small number of virtual hosts (256-512 or so), you should probably put the logs into separate files. Read the docs on the LogFormat directive, and mod_log_config, possibly even mod_logio (if you compiled and loaded it). > > 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 Umm, easy. Your VirtualHost blocks have no ScriptAlias directive, and no Directory block to allow access, and enable CGI execution. Read the Apache docs for these. Mine look like this: ScriptAlias /cgi-bin/ "/var/www/domain.dom/cgi-bin/" Options None # May need Options +ExecCGI . I am using suexec, # which seems to ignore the Options directive. :-\ Order allow,deny Allow from all > Vhost.conf > > is actually now in full force and diverting requests from the > directory Ok, so you changed a conf file and the web server acted differently. Changing the right file at least! :-) > > /var/www/html, which were the previous default document root, but > where > > to? The best I can tell, the web server isn't making any connections from outside the firewall to port 80, so it's not going to match these virtual hosts. That's why I get connection refused. No wait, you changed something, must have fixed the firewall. Now I get the same page loading for both domains, but with a missing "welcome.html". > > Regards > > Peter > > ----------------------------------------------------- > > > > #Peter's additions for NameBasedHosting 2004/may/03 > > > > #Top level - Deny access everywhere > > > > Deny from all > > > > > > NameVirtualHost * Change to NameVirtualHost *:80, to be sure it matches exactly the VirtualHost directives. Just to rule that out as a possible problem. > > > > ServerName www.lingualizer.net > > DocumentRoot /var/www/html/lingualizer > > #Allow access /var/www/html/lingualizer > > > > Allow from all > > > > DirectoryIndex index.html ScriptAlias ... ",,," Options ... Order ... Allow ... > > > > > > > > ServerName www.cotman-university.com > > DocumentRoot /var/www/html/cotman-university > > #Allow access /var/www/html/cotman-university > > > > Allow from all > > > > DirectoryIndex index.html ScriptAlias ... ",,," Options ... Order ... Allow ... > > > > > > -------------------------------------------------- > > -----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" > > To: > > 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 * > > > > > > > >ServerName www.cotman-university.com > > > >DocumentRoot /var/www/html/cotman-university > > > >DirectoryIndex index.html > > > > > > > > > > > >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 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 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 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