You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Brad Nicholes <BN...@novell.com> on 2001/09/13 00:36:48 UTC
Hard coded HTTPD_ROOT in httpd.h...
In httpd.h there are a number of hard coded paths that define the default server home directory. Looking at the code, it appears that if the user does not specify a -f parameter when starting apache, it will automatically look for the .CONF file in HTTPD_ROOT/conf/httpd.conf. This means that if HTTPD_ROOT for platform XX is defined as "/apache" but the user decided to install apache to "/apch", Apache would never find the httpd.conf file unless the -f <location> is defined on the command line. Leaving the default hard coded on NetWare would cause a problem. If HTTPD_ROOT were defined as "/apache" as on other platforms, NetWare will always default to "SYS:/Apache" which it many cases would be wrong since most apache users do not install add on software on the SYS: volume. Hard coding a volume name would always be wrong since the volume name is a user definable value. Wouldn't it make more since to define the default server home directory as getcwd() instead of a hard coded path?
thanks,
Brad
Re: Hard coded HTTPD_ROOT in httpd.h...
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Brad,
Look at the first hooks of the win32 project. We 'do our own thing'. This
aught to be a portable behavior (e.g., build with HTTPD_RELATIVE_ROOT defined?)
Bill
----- Original Message -----
From: "Brad Nicholes" <BN...@novell.com>
To: <de...@httpd.apache.org>
Sent: Wednesday, September 12, 2001 5:36 PM
Subject: Hard coded HTTPD_ROOT in httpd.h...
In httpd.h there are a number of hard coded paths that define the default server home directory. Looking at the code, it appears
that if the user does not specify a -f parameter when starting apache, it will automatically look for the .CONF file in
HTTPD_ROOT/conf/httpd.conf. This means that if HTTPD_ROOT for platform XX is defined as "/apache" but the user decided to install
apache to "/apch", Apache would never find the httpd.conf file unless the -f <location> is defined on the command line. Leaving the
default hard coded on NetWare would cause a problem. If HTTPD_ROOT were defined as "/apache" as on other platforms, NetWare will
always default to "SYS:/Apache" which it many cases would be wrong since most apache users do not install add on software on the
SYS: volume. Hard coding a volume name would always be wrong since the volume name is a user definable value. Wouldn't it make
more since to define the default server home directory as getcwd() instead of a hard coded path?
thanks,
Brad
Re: Hard coded HTTPD_ROOT in httpd.h...
Posted by Marc Slemko <ma...@znep.com>.
On Wed, 12 Sep 2001, Greg Stein wrote:
> On Wed, Sep 12, 2001 at 10:34:03PM -0400, Rodent of Unusual Size wrote:
> > * On 2001-09-12 at 21:11,
> > Ryan Bloom <rb...@covalent.net> excited the electrons to say:
> > >
> > > This is why we have config.layout.
> >
> > It is not just -f, it is -d as well. I think most installations use
> > either one of these or the default location set by the layout.
> > Not a problem, I think.
>
> If the hard-coded default is never used, then why don't we just toss it, and
> require people to pass/use a root?
It is used. By default. A default "configure --prefix=/under/my/hat
&& make && make install" will result in the default defines being used.
We need some way to know where to look for config files. This can
be done at compile time or at run time.
Right now we support it being done at compile time with these defines.
Lots of people do use it. Note that it is designed so that it
can be easily overridden from the #defined path at compile time, and
it often is.
It can be overridden at run time with command line options. The
original suggestion that started this thread was to base it off
the current working directory. I just don't see that offering any
real advantage, since command line options are directly associated
with the execution of the program, as opposed to the working directory
which is a OS maintained bit of information.
Re: Hard coded HTTPD_ROOT in httpd.h...
Posted by Greg Stein <gs...@lyra.org>.
On Wed, Sep 12, 2001 at 10:34:03PM -0400, Rodent of Unusual Size wrote:
> * On 2001-09-12 at 21:11,
> Ryan Bloom <rb...@covalent.net> excited the electrons to say:
> >
> > This is why we have config.layout.
>
> It is not just -f, it is -d as well. I think most installations use
> either one of these or the default location set by the layout.
> Not a problem, I think.
If the hard-coded default is never used, then why don't we just toss it, and
require people to pass/use a root?
Cheers,
-g
--
Greg Stein, http://www.lyra.org/
Re: Hard coded HTTPD_ROOT in httpd.h...
Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
* On 2001-09-12 at 21:11,
Ryan Bloom <rb...@covalent.net> excited the electrons to say:
>
> This is why we have config.layout.
It is not just -f, it is -d as well. I think most installations use
either one of these or the default location set by the layout.
Not a problem, I think.
--
#ken P-)}
Ken Coar, Sanagendamgagwedweinini http://Golux.Com/coar/
Author, developer, opinionist http://Apache-Server.Com/
"All right everyone! Step away from the glowing hamburger!"
Re: Hard coded HTTPD_ROOT in httpd.h...
Posted by Ryan Bloom <rb...@covalent.net>.
On Wednesday 12 September 2001 03:36 pm, Brad Nicholes wrote:
> In httpd.h there are a number of hard coded paths that define the
> default server home directory. Looking at the code, it appears that if the
> user does not specify a -f parameter when starting apache, it will
> automatically look for the .CONF file in HTTPD_ROOT/conf/httpd.conf. This
> means that if HTTPD_ROOT for platform XX is defined as "/apache" but the
> user decided to install apache to "/apch", Apache would never find the
> httpd.conf file unless the -f <location> is defined on the command line.
> Leaving the default hard coded on NetWare would cause a problem. If
> HTTPD_ROOT were defined as "/apache" as on other platforms, NetWare will
> always default to "SYS:/Apache" which it many cases would be wrong since
> most apache users do not install add on software on the SYS: volume. Hard
> coding a volume name would always be wrong since the volume name is a user
> definable value. Wouldn't it make more since to define the default server
> home directory as getcwd() instead of a hard coded path?
This is why we have config.layout. Define the correct layout for Netware, and
as long as the server is configured with that layout, this problem will go away.
The hard-coded stuff is just a default, almost everybody overrides the defaults
with whatever is correct for their platform.
Ryan
______________________________________________________________
Ryan Bloom rbb@apache.org
Covalent Technologies rbb@covalent.net
--------------------------------------------------------------