You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Daniel <da...@digitalfocus.com> on 2000/11/07 23:40:52 UTC

documentation/6813: enh: "Starting Apache" might mention the config. file is read twice

>Number:         6813
>Category:       documentation
>Synopsis:       enh: "Starting Apache" might mention the config. file is read twice
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   apache
>Arrival-Date:   Tue Nov 07 14:50:09 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     danielb@digitalfocus.com
>Release:        1.3.14
>Organization:
apache
>Environment:
n/a
>Description:
It would be helpful if the "Starting Apache" page of the manual 
(at .../htdocs/manual/invoking.html) documented the (apparent) fact
that the configuration file (httpd.conf) is read twice.

Although the documentation of the "-d serverroot" option does mention 
that the "ServerRoot" directive in the configuration file can override the 
server root, it is not apparent that Apache reads the configuration twice,
first reading the configuration file in the directory specified by the 
-d option, and _then_ reading the configuration file in the directory
specified by any ServerRoot directive in the first configuration file.


Actually, it that behavior reasonable to start with?  If you specify 
a -d option to identify a directory, and -f option to name a 
configuration file, and Apache reads that configuration file, you 
don't expect Apache to then go read a different configuration file.

Shouldn't Apache read its configuration once, or at least make sure it
reads only one file?
>How-To-Repeat:
To see the reading of both files:

- start with a default Apache installation
- copy conf/httpd.conf to somewhere else; intentially or accidentally 
  leave the ServerRoot directive as it was
- copy apachectl to somewhere; add a -d option to the httpd command to 
  point to the directory containing the copied conf/httpd.conf
- edit both httpd.conf files to have a gross syntax error (to see 
  when each is being read)
- run the copied apachectl; note the syntax errors reported from
  the copied httpd.conf, showing that the copied version is read
- remove the syntax errors in the copied httpd.conf
- run the copied apachectl again; now note the syntax errors from
  the original httpd.conf, showing the original version is read _also_

>Fix:
- read the configuration file only once
- don't let re-reading of configuration be affected by
  the first reading (read relative to the -d option or
  the compiled-in default, but don't read relative to the
  server root set by any ServerRoot directive)

>Release-Note:
>Audit-Trail:
>Unformatted:
 [In order for any reply to be added to the PR database, you need]
 [to include <ap...@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]
 
 


RE: documentation/6813: enh: "Starting Apache" might mention the config. file is read twice

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
> >Environment:
> n/a

The environment is always applicable.  Please provide your environment
so your (very reasonable) suggestion can be implemented.