jim         99/06/13 12:59:43

  Modified:    .        STATUS
               htdocs/manual/mod core.html directives.html
               src      CHANGES
               src/include http_conf_globals.h
               src/main http_core.c http_main.c
  Log:
  Submitted by: Mathijs Maassen <[EMAIL PROTECTED]>
  Reviewed by:  Jim, Lars
  Add the new DocumentRootCheck directive. This determines if we
  check for each DocumentRoot during startup.
  
  Revision  Changes    Path
  1.715     +1 -6      apache-1.3/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/STATUS,v
  retrieving revision 1.714
  retrieving revision 1.715
  diff -u -r1.714 -r1.715
  --- STATUS    1999/06/13 11:25:24     1.714
  +++ STATUS    1999/06/13 19:59:34     1.715
  @@ -1,5 +1,5 @@
     1.3 STATUS:
  -  Last modified at [$Date: 1999/06/13 11:25:24 $]
  +  Last modified at [$Date: 1999/06/13 19:59:34 $]
   
   Release:
   
  @@ -90,11 +90,6 @@
   
   
   Available Patches:
  -
  -    * Mathijs Maassen <[EMAIL PROTECTED]> path to disable the initial
  -      check/stat of DocumentRoot.
  -        Message-ID: <[EMAIL PROTECTED]>
  -     Status: Jim +1 (will add to docs), Lars +1
   
       * Stipe Tolj's Cygwin32 port
        PR#: 2936
  
  
  
  1.147     +36 -0     apache-1.3/htdocs/manual/mod/core.html
  
  Index: core.html
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/htdocs/manual/mod/core.html,v
  retrieving revision 1.146
  retrieving revision 1.147
  diff -u -r1.146 -r1.147
  --- core.html 1999/04/20 22:19:15     1.146
  +++ core.html 1999/06/13 19:59:35     1.147
  @@ -36,6 +36,7 @@
   <LI><A HREF="#directory">&lt;Directory&gt;</A>
   <LI><A HREF="#directorymatch">&lt;DirectoryMatch&gt;</A>
   <LI><A HREF="#documentroot">DocumentRoot</A>
  +<LI><A HREF="#documentrootCheck">DocumentRootCheck</A>
   <LI><A HREF="#errordocument">ErrorDocument</A>
   <LI><A HREF="#errorlog">ErrorLog</A>
   <LI><A HREF="#files">&lt;Files&gt;</A>
  @@ -743,6 +744,41 @@
   <P>There appears to be a bug in mod_dir which causes problems when the
   DocumentRoot has a trailing slash (<EM>i.e.</EM>, "DocumentRoot /usr/web/") 
so
   please avoid that.
  +
  +<P><HR>
  +
  +<H2><A NAME="documentrootcheck">DocumentRootCheck directive</A></H2>
  +<!--%plaintext &lt;?INDEX {\tt DocumentRootCheck} directive&gt; -->
  +<A
  + HREF="directive-dict.html#Syntax"
  + REL="Help"
  +><STRONG>Syntax:</STRONG></A> DocumentRootCheck <EM>On/Off</EM><BR>
  +<A
  + HREF="directive-dict.html#Default"
  + REL="Help"
  +><STRONG>Default:</STRONG></A> <CODE>DocumentRootCheck On</CODE><BR>
  +<A
  + HREF="directive-dict.html#Context"
  + REL="Help"
  +><STRONG>Context:</STRONG></A> server config<BR>
  +<A
  + HREF="directive-dict.html#Status"
  + REL="Help"
  +><STRONG>Status:</STRONG></A> core<BR>
  +<A
  + HREF="directive-dict.html#Compatibility"
  + REL="Help"
  +><STRONG>Compatibility:</STRONG></A> Available in Apache 1.3.7 and later
  +<P>
  +During startup, Apache does a <CODE>stat</CODE> of each
  +<A HREF="#documentroot">DocumentRoot</A>
  +to determine if the directory exists. If your server is
  +configured with lots of DocumentRoot directives (for example,
  +if you server numerous virtual hosts), this can <em>greatly</em> increase
  +the startup time. If you are sure that all the DocumentRoot
  +entries exist, you can tell Apache to bypass this check using
  +<BLOCKQUOTE><CODE>DocumentRootCheck Off</CODE></BLOCKQUOTE>
  +
   
   <P><HR>
   
  
  
  
  1.57      +1 -0      apache-1.3/htdocs/manual/mod/directives.html
  
  Index: directives.html
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/htdocs/manual/mod/directives.html,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- directives.html   1999/03/23 14:35:47     1.56
  +++ directives.html   1999/06/13 19:59:37     1.57
  @@ -95,6 +95,7 @@
   <LI><A HREF="core.html#directorymatch">&lt;DirectoryMatch&gt;</A>
   <LI><A HREF="mod_dir.html#directoryindex">DirectoryIndex</A>
   <LI><A HREF="core.html#documentroot">DocumentRoot</A>
  +<LI><A HREF="core.html#documentrootcheck">DocumentRootCheck</A>
   <LI><A HREF="core.html#errordocument">ErrorDocument</A>
   <LI><A HREF="core.html#errorlog">ErrorLog</A>
   <LI><A HREF="mod_example.html#example">Example</A>
  
  
  
  1.1378    +7 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1377
  retrieving revision 1.1378
  diff -u -r1.1377 -r1.1378
  --- CHANGES   1999/06/09 17:22:44     1.1377
  +++ CHANGES   1999/06/13 19:59:38     1.1378
  @@ -1,5 +1,9 @@
   Changes with Apache 1.3.7
   
  +  *) New directive, DocumentRootCheck, added to determine if
  +     we bother doing the stat of each DocumentRoot during
  +     startup. [Mathijs Maassen <[EMAIL PROTECTED]>. Jim Jagielski]
  +
     *) Win32: The query switch "apache -S" didn't exit after showing the
        vhost settings. That was inconsistent with the other query functions.
        [Bill Stoddard - Fixed by Martin on Unix in 1.3.4]
  @@ -40,6 +44,9 @@
     *) Remove "mxb" support from mod_negotiation -- it was a draft feature
        never accepted into any standard, and it opens up certain DoS
        attacks.  [Koen Holtman <[EMAIL PROTECTED]>]
  +
  +  *) TestCompile updated. We can now run programs and output the
  +     results during the Configure process. [ Jim Jagielski]
   
     *) The source is now quad (long long) aware as needed. Specifically,
        the Configure process determines the correct size of off_t and
  
  
  
  1.36      +1 -0      apache-1.3/src/include/http_conf_globals.h
  
  Index: http_conf_globals.h
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/include/http_conf_globals.h,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- http_conf_globals.h       1999/01/01 19:04:39     1.35
  +++ http_conf_globals.h       1999/06/13 19:59:40     1.36
  @@ -67,6 +67,7 @@
    */
   
   extern int ap_standalone;
  +extern int ap_documentroot_check;
   extern uid_t ap_user_id;
   extern char *ap_user_name;
   extern gid_t ap_group_id;
  
  
  
  1.263     +15 -1     apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.262
  retrieving revision 1.263
  diff -u -r1.262 -r1.263
  --- http_core.c       1999/06/09 11:27:54     1.262
  +++ http_core.c       1999/06/13 19:59:41     1.263
  @@ -1009,7 +1009,7 @@
       }
   
       arg = ap_os_canonical_filename(cmd->pool, arg);
  -    if (!ap_is_directory(arg)) {
  +    if (ap_documentroot_check && !ap_is_directory(arg)) {
        if (cmd->server->is_virtual) {
            fprintf(stderr, "Warning: DocumentRoot [%s] does not exist\n",
                    arg);
  @@ -1023,6 +1023,18 @@
       return NULL;
   }
   
  +static const char *set_document_root_check(cmd_parms *cmd, void *dummy, int 
arg)
  +{
  +    const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
  +
  +    if (err != NULL) {
  +        return err;
  +    }
  +
  +    ap_documentroot_check = arg != 0;
  +    return NULL;
  +}
  +
   API_EXPORT(void) ap_custom_response(request_rec *r, int status, char *string)
   {
       core_dir_config *conf = 
  @@ -2734,6 +2746,8 @@
     "Name(s) of per-directory config files (default: .htaccess)" },
   { "DocumentRoot", set_document_root, NULL, RSRC_CONF, TAKE1,
     "Root directory of the document tree"  },
  +{ "DocumentRootCheck", set_document_root_check, NULL, RSRC_CONF, FLAG,
  +  "En-/Disable checking for existance of DocumentRoot during startup"  },
   { "ErrorDocument", set_error_document, NULL, OR_FILEINFO, RAW_ARGS,
     "Change responses for HTTP errors" },
   { "AllowOverride", set_override, NULL, ACCESS_CONF, RAW_ARGS,
  
  
  
  1.445     +1 -0      apache-1.3/src/main/http_main.c
  
  Index: http_main.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/main/http_main.c,v
  retrieving revision 1.444
  retrieving revision 1.445
  diff -u -r1.444 -r1.445
  --- http_main.c       1999/06/09 13:37:51     1.444
  +++ http_main.c       1999/06/13 19:59:41     1.445
  @@ -230,6 +230,7 @@
    */
   
   int ap_standalone=0;
  +int ap_documentroot_check=1;
   uid_t ap_user_id=0;
   char *ap_user_name=NULL;
   gid_t ap_group_id=0;
  
  
  

Reply via email to