W3C home > Mailing lists > Public > www-jigsaw@w3.org > November to December 1996

Virtual Hosts HELP!!

From: bpm <bpm@terraweb.com>
Date: Thu, 5 Dec 1996 17:53:29 -0600
To: Anselm Baird-Smith <abaird@w3.org>
Cc: www-jigsaw@w3.org
Message-ID: <19961205235329.AAA26488@vlad.terraweb.com>
Anselm Baird writes:
 |bpm@terraweb.com writes:
 | > Ok, I've read the archive about adding Virtual Hosts.  I've tried
 | > adding Virtual Hosts my self, but I can not get it to work.
 | > 
 | > I've added to the /etc/hosts file an alias "Virtual" to my machine.
 | > What I want is to have a virtual host that points to an existing html
 | > root directory and have the real host point to the /Admin & original
 | > Jigsaw directory/resource structures.
 | > 
 | > Any help or pointers will be greatly appreciated.
 | > 
 | > This is what I've done.
 | > 
 | > .... 
 |Everything ok up to here,
 | > 9) added name:  "Brian"
 | >    added class: w3c.jigsaw.resources.PassDirectory
 | >    clicked "Create"
 |This is where you get it wrong (unless your machine as "Brian" as an
 |alias). When you use that VirtualHostResource, children names should
 |*match* vritual host names. Eg when testing I use an alias on my
 |machine, and add a child having that name (including port number, if
 |needed, it turns out to be "mymachine.w3.org:8008")

Yep!  Thanks.  To clarify what I did (which might help others), and
what I did not do,

I have in my /etc/hosts file I have the following for my machine:  vlad.terraweb.com vlad jigsaw       loghost

My machine is vlad with an alias of jigsaw.

I added a resource to the main level with a name of "Virtual",
resource type w3c.jigsaw.resources.VirtualHostResource.  Changed the
attribute field of "followup" to "root".  Then I added a resource to
"Virtual".  The name I HAD to give it to work was "jigsaw:8001".  (I
guess because I am running off of port 8001.  If I change the default
port, then I guess I must add a new resource for that port?  If I have
the name as "jigsaw" then the url: <http://jigsaw:8001> fails.  BUT
with the name as "jigsaw:8001" then the url: <http://jigsaw:8001>
works!?), resource type w3c.jigsaw.resources.PassDirectory.  Adding
different resources under "jigsaw:8001" as PassDirectory, or
CgiPassDirectory work just great.

But I found that if I forgot to set up a resource under the
jigsaw:8001 virtual host, I had to go back to the General properties,
set the root.name back to root, save & stop the server, restart the
server before I could edit the jigsaw:8001 resource.

I also found that even then, the resources under the jigsaw:8001
resource could not be found.  I noticed that the "resource url" while
I was adding resources to the jigsaw:8001 resource was:
"http://vlad:8001/Virtual/jigsaw:8001/whatever.html".  After going
back and trying to edit the jigsaw:8001 resource, the "resource url"
became: "http://jigsaw:8001/whatever.html".

This meant that any existing resources under jigsaw:8001 could not be
found.  I had to remove jigsaw:8001 and re add it to "Virtual".  I
could then add all the resources that I needed.  Re-set the General
property of w3c.jigsaw.root.name to "Virtual".  But if I need to
change anything on the virtual host (jigsaw:8001), I had to go back
and go though the process of removing, re-adding, adding, etc.

I also found that the SSI for
<!--#include virtual="/cgi-bin/fortune" --> does not work for the
virtual host.

In all of this I also found that if I am navigating the browser with
the "Back" button and come to a page that called the /Admin/Exit
resource that the server will be stopped!  Not quite the behavior I
expected.  Like running over a land mine!

Anselm, I want to thank you for all the effort you are doing to answer
questions, give hints, point out pilot errors, etc.  You have made the
Jigsaw project a "Model Project" that ALL should emulate.  Thank you.

Brian Millett                    
Technology Applications Inc.     "Heaven can not exist,
(314) 530-1981                          If the family is not eternal"
bpm@techapp.com                   F. Ballard Washburn
Received on Thursday, 5 December 1996 18:50:52 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:30 UTC