Received: (from majordom@localhost) by hyperreal.com (8.8.5/8.8.5) id SAA00646; Mon, 28 Apr 1997 18:55:34 -0700 (PDT) Received: from paris.ics.uci.edu (mmdf@paris.ics.uci.edu [128.195.1.50]) by hyperreal.com (8.8.5/8.8.5) with SMTP id SAA00624 for ; Mon, 28 Apr 1997 18:55:28 -0700 (PDT) Received: from kiwi.ics.uci.edu by paris.ics.uci.edu id aa10375; 28 Apr 97 18:54 PDT To: new-httpd@apache.org Subject: Re: [PATCH] PR#449: allow -D in Configuration to override some things In-reply-to: Your message of "Sun, 27 Apr 1997 14:49:39 PDT." Date: Mon, 28 Apr 1997 18:53:45 -0700 From: "Roy T. Fielding" Message-ID: <9704281854.aa10375@paris.ics.uci.edu> Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org +1 ....Roy In message , Dean Gaudet writes: >On Sun, 27 Apr 1997, Marc Slemko wrote: >> We also need to allow the config file locations to be overridden. Not >> everyone wants *.conf in HTTPD_ROOT/conf/. May be able to get by with >> just allowing one to be overridden (haven't looked at the order of >> parsing), but should do all three just to make it nice. > >You should be able to get by with just moving the SERVER_CONFIG_FILE >and then redefining the rest within that file. I don't see the point >in #ifndefing everything... so here's a patch that just does it for: > > HTTPD_ROOT > SERVER_CONFIG_FILE > DEFAULT_PATH > SHELL_PATH > >The first two let you put your configuration anywhere anywhichway, the >second two aren't customizable inside the configuration files. > >Dean > >Index: httpd.h >=================================================================== >RCS file: /export/home/cvs/apache/src/httpd.h,v >retrieving revision 1.99 >diff -c -3 -r1.99 httpd.h >*** httpd.h 1997/04/27 11:57:16 1.99 >--- httpd.h 1997/04/27 21:44:42 >*************** >*** 65,76 **** >--- 65,78 ---- > /* Define this to be the default server home dir. Anything later in this > * file with a relative pathname will have this added. > */ >+ #ifndef HTTPD_ROOT > #ifdef __EMX__ > /* Set default for OS/2 file system */ > #define HTTPD_ROOT "/os2httpd" > #else > #define HTTPD_ROOT "/usr/local/etc/httpd" > #endif >+ #endif > > /* Root of server */ > #ifdef __EMX__ >*************** >*** 144,150 **** >--- 146,154 ---- > #endif > > /* The name of the server config file */ >+ #ifndef SERVER_CONFIG_FILE > #define SERVER_CONFIG_FILE "conf/httpd.conf" >+ #endif > > /* The name of the document config file */ > #define RESOURCE_CONFIG_FILE "conf/srm.conf" >*************** >*** 161,175 **** >--- 165,183 ---- > #define DEFAULT_USER_DIR "public_html" > > /* The default path for CGI scripts if none is currently set */ >+ #ifndef DEFAULT_PATH > #define DEFAULT_PATH "/bin:/usr/bin:/usr/ucb:/usr/bsd:/usr/local/bin" >+ #endif > > /* The path to the Bourne shell, for parsed docs */ >+ #ifndef SHELL_PATH > #ifdef __EMX__ > /* Set default for OS/2 file system */ > #define SHELL_PATH "CMD.EXE" > #else > #define SHELL_PATH "/bin/sh" > #endif >+ #endif > > /* The path to the suExec wrapper, can be overridden in Configuration */ > #ifndef SUEXEC_BIN >*************** >*** 191,199 **** > > /* The size of the server's internal read-write buffers */ > #define IOBUFSIZE 8192 >- >- /* The number of header lines we will accept from a client */ >- #define MAX_HEADERS 200 > > /* Number of servers to spawn off by default --- also, if fewer than > * this free when the caretaker checks, it will spawn more. >--- 199,204 ---- >