httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Beauford.2003" <beauford.2...@rogers.com>
Subject Re: [users@httpd] More problem with Virtual Hosts
Date Sun, 01 Dec 2002 16:10:40 GMT
Daniel,

Thanks for the info, I have been playing around with this all morning and
see exactly what you are saying. I have since moved everything for each host
into its proper directory - not trying to mess around with a so called
shared directories - this has made everything work as normal.

What had me confused, and you hit it on the head, was that
/usr/local/apache/htdocs/one/ is the top level directory, and doing a
../whatever will not work as I thought it would.

Thanks again.

----- Original Message -----
From: "Daniel Grace" <rubein@earthlink.net>
To: <users@httpd.apache.org>
Sent: Saturday, November 30, 2002 10:10 AM
Subject: Re: [users@httpd] More problem with Virtual Hosts


> From: "Beauford.2003" <beauford.2003@rogers.com>
> To: <users@httpd.apache.org>
> Sent: Sunday, December 01, 2002 5:17 AM
> Subject: [users@httpd] More problem with Virtual Hosts
>
>
> > Hi,
> >
> > I finally managed to some degree to get virtual hosts working, but now
it
> > has created a host of other problems. I have two virtual hosts and my
main
> > host (i.e. main.domain.com, one.domain.com, two.domain.com).
> >
> [snip]
> > the files for main.domain.com are in /usr/local/apache/htdocs
> > the files for one.domain.com is are in /usr/local/apache/htdocs/one
> > the files for two.domain.com is are in /usr/local/apache/htdocs/two
> >
> [snip]
> > The other problems I am having relate to paths. Some of my pages now
don't
> > work because the paths are wrong, but can I figure out how to set them
> > right.
> >
> > Example: one.main.com  is /usr/local/apache/htdocs/one/index.html which
> > opens the main page. but then I have other directories that I need to
> access
> > in /usr/local/apache/htdocs/other - so what is the path?
>
> Remember that paths in an HTML document are relative to how they appear to
> the client.  To the client, /usr/local/apache/htdocs/one/  (as viewed from
> http://one.domain.com/ ) *IS* the top level directory, thus ../ to go up
one
> level to /usr/local/apache/htdocs will not work like expected.  In fact,
it
> won't work at all. :)
>
> If you need to do this, you'll need to either use absolute pathnames
> complete with a URL to the correct virtual host, or you'll need to alias
> /usr/local/apache/htdocs into the one.domain.com domain.  Either the
> Alias/Scriptalias directives should do the job, or a symbol link if you
have
> Followsymlinks (?) on.  Note that either one of these will give you an
> oddity where someone on one.domain.com could open
> http://one.domain.com/parentdir/one/parentdir/one/parentdir/one/... -- as
> for whether this is a vulnerability or not, I really don't think so but it
> can lead to bad & confusing things if you're not careful.
>
> IMHO you'd be best off giving each host its own separate directory that
does
>  NOT contain any of the other vhosts directories in it, and then creating
a
> separate directory for all of the 'shared' stuff for all of your hosts and
> either aliasing it in or giving it a vhost of its own -- but that's just
my
> 2 cents worth.
>
> -- Daniel Grace
> Certified 99.9999% lurker
>
>
> ---------------------------------------------------------------------
> 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