Return-Path: Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 29408 invoked by uid 500); 17 Apr 2003 08:00:32 -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 29386 invoked from network); 17 Apr 2003 08:00:31 -0000 Received: from ns0a.swx.com (146.109.240.107) by daedalus.apache.org with SMTP; 17 Apr 2003 08:00:31 -0000 Received: from gate0b.unix.swx.ch (gate0b [192.168.252.145]) by ns0a.swx.com (8.12.9/8.12.6) with ESMTP id h3H80ggn021713 for ; Thu, 17 Apr 2003 10:00:42 +0200 (MEST) Received: from SOMEXEVS001.ex.ordersx.org (localhost [127.0.0.1]) by gate0b.unix.swx.ch (8.12.9/8.12.6) with ESMTP id h3H80fkO003676 for ; Thu, 17 Apr 2003 10:00:41 +0200 (MEST) Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Date: Thu, 17 Apr 2003 10:00:41 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [users@httpd] VirtualHost HELP! Importance: normal Priority: normal thread-index: AcMETusxRdoKj9PrRAK3lc5LAHnWPAAZKIKg From: "Boyle Owen" To: X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Subject: RE: [users@httpd] VirtualHost HELP! Plain text please.. I had a quick look at your config and it seems reasonably OK - you have a NameVirtualHost directive and your VH blocks look OK. However, if you separate out the important parts of the config, you get: ServerName www.chmsmortgage.com DocumentRoot "C:/CHMS_Site" ServerName yourlastmortgage.com DocumentRoot "C:/CHMS_Site/EM" ServerName chmsmortgage.com DocumentRoot "C:/CHMS_Site" - The VH ServerNames do not begin "www." - is this intentional? Do you really want the sites to be http://yourlastmortgage.com and http://chmsmortgage.com/? (Guess you do - they work :-) - the first block acts as a kind of "default" server, but it has the same docroot as VH2. Hmmm... Not sure why you'd want this. - VH1's docroot is a sub-dir of VH2's docroot. This means that http://chmsmortgage.com/EM/page.html and http://yourlastmortgage.com/page.html lead to the same file. Is this intentional? I think the last point might be the root of your trouble - most of the time, different VHs access separate branches of the filesystem, e.g. VH1 -> /home/html/vh1_data, VH2 -> /home/html/vh2_data etc. There is nothing wrong with having different VHs come in at different levels on the same filesystem but it would certainly make your internal and tags complicated. I notice that in the pages you use relative URLs to images (e.g. so this would mean that for your two VHs to work, you'd need two images directories, C:/CHMS_Site/EM/images and C:/CHMS_Site/images. Do you have that? I would suggest the following: - Tidy up the config; put all site specific directives inside VHs and use ServerAlias, e.g. ServerName chmsmortgage.com ServerAlias www.chmsmortgage.com DocumentRoot "C:/CHMS_Site" ServerName yourlastmortgage.com ServerAlias www.yourlastmortgage.com DocumentRoot "C:/CHMS_Site/EM" N.B. put your default VH first - if apache comes in with the correct IP address but can't match the ServerName, it takes the first one it finds. - Put all the images in one directory, e.g. C:/CHMS_Site/images in VH1. Then use an Alias in VH2 to map to it: Alias /images C:/CHMS_Site/images This way, http://chmsmortgage.com/images/pic.gif and http://yourlastmortgage.com/images/pic.gif lead to the same file, even though the VHs have different docroots. Now you can reference images throughout both sites with *absolute* URLS, e.g. (N.B. The leading "/" on the file path!) Rgds, Owen Boyle Disclaimer: Any disclaimer attached to this message may be ignored. -----Original Message----- From: Webmaster [mailto:webmaster@chmsmortgage.com] Sent: Mittwoch, 16. April 2003 21:32 To: users@httpd.apache.org Subject: [users@httpd] VirtualHost HELP! I have set up a few Apache Servers, all on Windows 2000 machines, and all successfully using VirtualHost. I am moving a site from hosting at one server to a new server running on Windows XP Pro. I can not getting the VirtualHost to work correctly. I am running Apache 2.0.45 with PHP 4.3.0, on a windows XP Pro machine. Basically I am trying to host two sites, and the VirtualHosts, are "bleeding" together, pulling the index.html file from the wrong document root, but the correct image from the correct document root. I have tried virtually every deviation of NameServer address, using IP Address within VirtualHost tags, Using IP and Port within VirtualHost tags, Using * within VirtualHost tags. I have also tried using ApacheConf, and recreating the conf file from scratch. I am at a total loss here... Any, and I mean ANY ideas would be greatly appreciated! Please feel free to view my http.conf file at http://www.chmsmortgage.com/myconf.conf Thanks in advance for any suggestions! 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 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