httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Webmaster" <webmas...@chmsmortgage.com>
Subject RE: [users@httpd] VirtualHost HELP!
Date Thu, 17 Apr 2003 15:41:49 GMT
Boyle,

Thank you for looking into this for me.

I followed for instructions, and still had no luck.

However, I notice that when I called for a completely unique and only within
one of the DocumentRoots (to avoid cofusion between the two index.html
page), and I would recieve an error "No input file specified".

This led me to my php.ini file, where I found that I have original had set
the php document root to "c:/chms_site" and that was creating the problem.

Everything is good now, so I am going to go back a start fresh with
modifying the http.default just to keep everything clean.

I the http.conf to be better than "reasonably OK", would you mind taking a
look at it once I redo it?

Let me know, and thanks again for all the support!

Brandon


-----Original Message-----
From: Boyle Owen [mailto:Owen.Boyle@swx.com]
Sent: Thursday, April 17, 2003 2:01 AM
To: users@httpd.apache.org
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:

<outside VH>
ServerName www.chmsmortgage.com
DocumentRoot "C:/CHMS_Site"

<VH1>
  ServerName yourlastmortgage.com
  DocumentRoot "C:/CHMS_Site/EM"
<VH2>
  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 <img> and <a href> tags
complicated. I notice that in the pages you use relative URLs to images
(e.g. <img src="images/blankdot.gif"> 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.

<VH1>
  ServerName chmsmortgage.com
  ServerAlias www.chmsmortgage.com
  DocumentRoot "C:/CHMS_Site"
<VH2>
  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. <img
src="/images/blankdot.gif"> (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 <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