You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Vinay Y S <vi...@gmail.com> on 2006/09/24 17:34:13 UTC

[users@httpd] Using relative paths in

Hi,
I want to use relative paths in <Directory "relative/path/here"> and
all other places wherever paths are required; and change only the
ServerRoot and DocumentRoot based on where my server is installed. I
want to know if this path is relative to DocumentRoot or ServerRoot.
What I have observed till now is that it isn't relative to either of
them. It is relative to the current working directory of the
httpd process. Please confirm if this correct.

When apache is run as a Windows service, what would be its current
working directory?

TIA,

-- 
Vinay Y S
http://vinay-ys.blogspot.com

---------------------------------------------------------------------
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


Re: [users@httpd] Using relative paths in

Posted by Joshua Slive <jo...@slive.ca>.
On 9/24/06, Steve Swift <st...@gmail.com> wrote:
> If you want relative to the Document Root then consider using <Location>
>
>
> On 24/09/06, Vinay Y S <vinay.ys@gmail.com > wrote:
> > Hi,
> > I want to use relative paths in <Directory "relative/path/here"> and
> > all other places wherever paths are required; and change only the
> > ServerRoot and DocumentRoot based on where my server is installed. I
> > want to know if this path is relative to DocumentRoot or ServerRoot.
> > What I have observed till now is that it isn't relative to either of
> > them. It is relative to the current working directory of the
> > httpd process. Please confirm if this correct.
> >
> > When apache is run as a Windows service, what would be its current
> > working directory?

That isn't really a great suggestion for security reasons.  <Location>
should not be used for file-system locations, because it can be
circumvented.

This sounds like a problem that could best be solved with mod_macro,
mod_define, or similar config-processing module (or a config
pre-processor).  I haven't checked the code to see exactly how
relatively <Directory> sections are handled, but it is not something I
would recommend.

Joshua.

---------------------------------------------------------------------
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


Re: [users@httpd] Using relative paths in

Posted by Steve Swift <st...@gmail.com>.
If you want relative to the Document Root then consider using <Location>

On 24/09/06, Vinay Y S <vi...@gmail.com> wrote:
>
> Hi,
> I want to use relative paths in <Directory "relative/path/here"> and
> all other places wherever paths are required; and change only the
> ServerRoot and DocumentRoot based on where my server is installed. I
> want to know if this path is relative to DocumentRoot or ServerRoot.
> What I have observed till now is that it isn't relative to either of
> them. It is relative to the current working directory of the
> httpd process. Please confirm if this correct.
>
> When apache is run as a Windows service, what would be its current
> working directory?
>
> TIA,
>
> --
> Vinay Y S
> http://vinay-ys.blogspot.com
>
> ---------------------------------------------------------------------
> 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
>
>


-- 
Steve Swift
http://www.swiftys.org.uk