www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel <dani...@digitalfocus.com>
Subject documentation/6813: enh: "Starting Apache" might mention the config. file is read twice
Date Tue, 07 Nov 2000 22:40:52 GMT

>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
>Class:          doc-bug
>Submitter-Id:   apache
>Arrival-Date:   Tue Nov 07 14:50:09 PST 2000
>Originator:     danielb@digitalfocus.com
>Release:        1.3.14
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?
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_

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

 [In order for any reply to be added to the PR database, you need]
 [to include <apbugs@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!     ]

View raw message