1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-05 05:30:39 +03:00
Commit Graph

224 Commits

Author SHA1 Message Date
Chris Darroch
e69f467709 Introduce a check_config phase between pre_config and open_logs,
to allow modules to review interdependent configuration directive
values and adjust them while messages can still be logged to the
console.

The open_logs phase is already used somewhat for this purpose by
certain MPMs (winnt, prefork, worker, and event) but only by forcing
their functions ahead of the core ap_open_logs() function, and
since this phase runs after the ap_signal_server function during startup,
it can not be used to generate messages on the console when restarting.

Add the check_config phase to mod_info and mod_example.

Handle relevant MPM directives during this phase and format messages
for both the console and the error log, as appropriate.  Bounds and sanity
checks on the values of the MPM directives are handled in sequence in
this phase instead of in the various directive handling functions, since
those functions (e.g., set_max_clients()) may not be called at all if their
directives do not appear in the configuration files, and even if they
are called, there is no guarantee that this will occur in any particular
order.

Remove from the worker and event MPMs the code in the pre_config phase
that alters the configuration node tree by re-ordering ThreadsPerChild
ahead of MaxClients.  This code is effective but insufficient; for
example, if ServerLimit follows MaxClients, the test against server_limit
in set_max_clients() is invalid.  (In practice, this only results in
incorrect or absent warnings on the console, because server_limit is
set to its configured value when the main loop re-runs the configuration
process.)

Prevent ap_threads_per_child from exceeding thread_limit in the
winnt, worker, and event MPMs.  This situation could occur if
ThreadsPerChild was not specified in the configuration files and
ThreadLimit was set to a value smaller than DEFAULT_THREADS_PER_CHILD,
because set_threads_per_child() would never be called and therefore
its bounds check against thread_limit would not be performed.

Remove from the winnt, prefork, worker, and event MPMs the
changed_limit_at_restart flag.  Set the first_server_limit and
first_thread_limit values during the first execution of the check_config
function, and use them to detect changes to ServerLimit and ThreadLimit
across restarts and issue appropriately formatted warnings.  Remove the
comments about the error log being a "bit bucket"; this was true when
the code was originally committed in r92530 but that was due to a bug
fixed in r92769.

Be consistent about setting all MPM configuration directive values in the
pre_config phase.

Rephrase and reformat the console and log file messages relating to
MPM configuration directives to be consistent across all MPMs.  Use
briefer messages when logging to the error log than to the console.

Update miscellaneous stale comments and messages (e.g., reference to
daemons_min_free in worker and event MPMs, "prefork open_logs" in
winnt MPM, and StartServers in netware MPM).

The winnt, netware, beos, and mpmt_os2 MPMs should be tested by developers
with access to those platforms, especially the winnt MPM, which has
unique logic with respect to distinguishing between parent and child
processes during the configuration phases.

Update the English documentation for the worker MPM's ThreadsPerChild
directive, which no longer needs to precede other MPM directives in the
configuration files if it has a non-default value.  The German (.de) and
Japanese (.ja) translations should be updated by developers fluent in
those languages.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@431460 13f79535-47bb-0310-9956-ffa450edef68
2006-08-14 22:55:45 +00:00
Roy T. Fielding
de659cbed0 update license header text
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420983 13f79535-47bb-0310-9956-ffa450edef68
2006-07-11 20:33:53 +00:00
Joe Orton
8984444d42 * server/main.c (abort_on_oom): New function.
(create_process): Set abort callback for process pool.
(main): Set abort callback for global pool.

Reviewed by: colm


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@406953 13f79535-47bb-0310-9956-ffa450edef68
2006-05-16 14:17:02 +00:00
Colm MacCarthaigh
dd95d7c37c Update the copyright year in all .c, .h and .xml files
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@395228 13f79535-47bb-0310-9956-ffa450edef68
2006-04-19 12:11:27 +00:00
William A. Rowe Jr
4a60c07a94 With all of the, uhm, interesting manners in which httpd
can be built and installed, let's ensure httpd -V gives the
  reporter a chance to identify the APR flavor used to compile
  and to run httpd when reporting bugs.
  

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@390573 13f79535-47bb-0310-9956-ffa450edef68
2006-04-01 02:48:24 +00:00
Jim Jagielski
5061d9fa92 No functional Change: Removing trailing whitespace. This also
means that "blank" lines consisting of just spaces or
tabs are now really blank lines


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332306 13f79535-47bb-0310-9956-ffa450edef68
2005-11-10 15:11:44 +00:00
Jeff Trawick
aa6fdd0e52 httpd.exe/apachectl -V: display the DYNAMIC_MODULE_LIMIT setting
(1.3 has done that for a while)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@265737 13f79535-47bb-0310-9956-ffa450edef68
2005-09-01 14:21:38 +00:00
Joe Orton
5f64e4f136 * server/main.c (suck_in_APR): Remove weird gzeof reference which
broke all the -Werror builds.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@264886 13f79535-47bb-0310-9956-ffa450edef68
2005-08-30 22:53:37 +00:00
Ian Holsman
8c1e315d3f Doxygen fixup / cleanup
submited by: Neale Ranns neale ranns.org
reviewed by: Ian Holsman



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@263931 13f79535-47bb-0310-9956-ffa450edef68
2005-08-28 23:03:59 +00:00
Colm MacCarthaigh
d7c04b158c Move the "GracefulShutdownTimeout" directive into mpm_common, for re-use
with other MPM's.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@240296 13f79535-47bb-0310-9956-ffa450edef68
2005-08-26 17:43:24 +00:00
Colm MacCarthaigh
432af0071e Make the neccessary changes to mpm_common and main to support a graceful-stop
command line argument. 



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@240269 13f79535-47bb-0310-9956-ffa450edef68
2005-08-26 16:00:59 +00:00
Paul Querna
b4369f78a1 * server/main.c: Remove the suck_in_apr_password_validate() hack. apr_password_validate is part of the public APR interface and this hack should not be needed on any platform.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@179879 13f79535-47bb-0310-9956-ffa450edef68
2005-06-03 20:35:27 +00:00
Justin Erenkrantz
905cdf9f0b Update copyright year to 2005 and standardize on current copyright owner line.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151408 13f79535-47bb-0310-9956-ffa450edef68
2005-02-04 20:28:49 +00:00
Joe Orton
28a2fdc595 Implement -t -DDUMP_MODULES using generic test_config hook rather than
hooking into mod_so from main.c:

* include/http_config.h, server/config.c: Declare test_config hook.

* server/main.c: Drop hooks into mod_so; run test_config hooks.

* modules/mappers/mod_so.h: Drop ap_dump_loaded_modules optional
function.

* modules/mappers/mod_so.c (dump_loaded_modules): Renamed from
ap_dump_loaded_modules; only run if -DDUMP_MODULES is defined.
(register_hooks): Register test_config hook instead of optional
function.

Reviewed by: Justin Erenkrantz, Paul Querna


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104685 13f79535-47bb-0310-9956-ffa450edef68
2004-08-17 13:47:10 +00:00
Geoffrey Young
23d0b267f0 fix compiler warnings
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104249 13f79535-47bb-0310-9956-ffa450edef68
2004-07-12 16:36:42 +00:00
Paul Querna
4072b62bf8 Add DUMP_MODULES
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104213 13f79535-47bb-0310-9956-ffa450edef68
2004-07-10 03:38:02 +00:00
Martin Kraemer
3b5b7677b0 Add OS and APACHE_MPM_DIR to -V output
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104083 13f79535-47bb-0310-9956-ffa450edef68
2004-06-29 14:08:17 +00:00
Geoffrey Young
565fe7dc8d initialize server arrays prior to calling ap_setup_prelinked_modules
so that static modules can push Defines values when registering
hooks just like DSO modules can
Submitted by:	philippe chiasson
Reviewed by:	geoff


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103976 13f79535-47bb-0310-9956-ffa450edef68
2004-06-17 15:49:40 +00:00
André Malo
49f48fb4b4 changed the following APIs to return an error instead of hard exiting:
ap_add_module, ap_add_loaded_module, ap_setup_prelinked_modules,
and ap_process_resource_config


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103517 13f79535-47bb-0310-9956-ffa450edef68
2004-04-25 17:23:31 +00:00
Jeff Trawick
4e49e3ea3e Don't include newlines in strings passed to ap_log_error.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103182 13f79535-47bb-0310-9956-ffa450edef68
2004-03-29 02:21:29 +00:00
André Malo
eeb57c17ad fix name of The Apache Software Foundation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102619 13f79535-47bb-0310-9956-ffa450edef68
2004-02-09 20:40:53 +00:00
André Malo
e88fcf3c64 fix copyright dates according to the first check in
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102589 13f79535-47bb-0310-9956-ffa450edef68
2004-02-08 13:58:22 +00:00
André Malo
4f02cb1e18 apply Apache License, Version 2.0
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102525 13f79535-47bb-0310-9956-ffa450edef68
2004-02-06 22:58:42 +00:00
Martin Kraemer
ac8b37fd20 PR:
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102187 13f79535-47bb-0310-9956-ffa450edef68
2004-01-05 10:34:07 +00:00
André Malo
fb07607180 update license to 2004.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102135 13f79535-47bb-0310-9956-ffa450edef68
2004-01-01 13:26:26 +00:00
Joe Orton
c555033723 * server/main.c (suck_in_expat): Remove function, USE_EXPAT is never
defined.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102012 13f79535-47bb-0310-9956-ffa450edef68
2003-12-10 13:43:14 +00:00
Jeff Trawick
e933536f5a Clean up httpd -V output: Instead of displaying the MPM source
directory, display the MPM name and some MPM properties.

Submitted by: Geoffrey Young <geoff apache.org>
Reviewed by:  Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101978 13f79535-47bb-0310-9956-ffa450edef68
2003-12-04 03:05:42 +00:00
Jeff Trawick
1dc6636640 tidy up some charset recoding issues
the "need" for APACHE_XLATE went away some years ago when BUFF went
POOF and charset recoding (translation) of non-protocol data
could no longer be performed by the core...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101894 13f79535-47bb-0310-9956-ffa450edef68
2003-11-26 02:09:25 +00:00
Martin Kraemer
1143775b66 Documentation says -DDUMP_VHOSTS is equivalent to setting -S
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101196 13f79535-47bb-0310-9956-ffa450edef68
2003-09-08 16:39:04 +00:00
Jeff Trawick
aa21671e13 switch to APR 1.0 API (which is still in flux)
because of the changes to the argument lists of apr_mmap_dup and apr_socket_create,
2.1-dev won't build with apr and apr-util's 0.9 branch anymore


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101154 13f79535-47bb-0310-9956-ffa450edef68
2003-09-03 19:27:12 +00:00
Jeff Trawick
2bbb0252b6 add a hint about handling of IPv4-mapped IPv6 addresses
to the output of httpd -V


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98753 13f79535-47bb-0310-9956-ffa450edef68
2003-02-22 14:32:39 +00:00
Justin Erenkrantz
1a344d46b6 Allow restart of httpd to occur even with syntax errors in the config
file.  (Out-of-date DSOs with bad MMNs will still be fatal unfortunately.)

Add return parameter to ap_process_config_tree - OK on success, !OK on
syntax error.  We will no longer call exit() from ap_process_config_tree.
The caller must exit if there is an error (makes sense anyway).  This allows
the initial start-up code to delay the exit until trying to let the
signal_server optional function execute first.

(The chances are that the syntax error isn't in the PidFile directive.  If
that happens, we'll try the default one.  Oh, well.)

PR: 16813


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98693 13f79535-47bb-0310-9956-ffa450edef68
2003-02-17 07:04:50 +00:00
André Malo
742af25096 finished that boring job:
update license to 2003.

Happy New Year! ;-))


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98573 13f79535-47bb-0310-9956-ffa450edef68
2003-02-03 17:53:28 +00:00
Bradley Nicholes
a6d627ff01 Enabled the -n parameter on NetWare to allow the administrator to rename
the console screen


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98535 13f79535-47bb-0310-9956-ffa450edef68
2003-01-29 17:09:50 +00:00
Jeff Trawick
8aab220f59 don't use deprecated function apr_sort_hooks()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97242 13f79535-47bb-0310-9956-ffa450edef68
2002-10-16 18:03:44 +00:00
Aaron Bannert
b5be533385 Add -S as a synonym for -t -DDUMP_VHOSTS
Submitted by:	Thom May <thom@planetarytramp.net>
Reviewed by:	Aaron Bannert


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97120 13f79535-47bb-0310-9956-ffa450edef68
2002-10-07 01:39:20 +00:00
William A. Rowe Jr
e01dcce377 We log this failure (with an identical message) in the restart loop code,
there's no reason not to note it in the preflight pass.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96827 13f79535-47bb-0310-9956-ffa450edef68
2002-09-15 21:34:08 +00:00
William A. Rowe Jr
a5de2a2ff9 suck_in wasn't sucking hard enough. Fixed the header.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96092 13f79535-47bb-0310-9956-ffa450edef68
2002-07-17 07:10:52 +00:00
William A. Rowe Jr
7c4af3aa9e Doc it.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95871 13f79535-47bb-0310-9956-ffa450edef68
2002-06-23 10:27:54 +00:00
William A. Rowe Jr
010e521924 -T hasn't been supported for some great while.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95618 13f79535-47bb-0310-9956-ffa450edef68
2002-06-12 19:34:56 +00:00
Jeff Trawick
4c133221e0 Fix the display of the default name for the mime types config
file.

PR:           9729
Submitted by: Matthew Brecknell <mbrecknell@orchestream.com>
Reviewed by:  Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95591 13f79535-47bb-0310-9956-ffa450edef68
2002-06-10 16:43:52 +00:00
Jeff Trawick
fc658e628b the "-k startssl" parameter is reverted by popular demand
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95269 13f79535-47bb-0310-9956-ffa450edef68
2002-05-24 18:48:10 +00:00
Jeff Trawick
e801e407fc issue the usage message if there are extraneous arguments on
the command line


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95254 13f79535-47bb-0310-9956-ffa450edef68
2002-05-23 18:52:26 +00:00
Jeff Trawick
0547e6e6e9 Add "-k start|startssl|restart|graceful|stop" support to httpd
for the Unix MPMs.  These have semantics very similar to the
old apachectl commands of the same name.

The use of stderr/stdout and exit status for error conditions
needs to be revisited.  For now it matches apachectl behavior.

Justin Erenkrantz got the ball rolling with this feature.  Some
of his support code was used unchanged.  Other code was shuffled
around and modified or rewritten.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95237 13f79535-47bb-0310-9956-ffa450edef68
2002-05-23 12:58:37 +00:00
Jeff Trawick
e6f51fa631 fix a spelling error in a comment
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95236 13f79535-47bb-0310-9956-ffa450edef68
2002-05-23 12:20:56 +00:00
Aaron Bannert
b5db596b6f Omit the second linefeed after "Syntax OK"
Submitted by:	Joe Orton <jorton@redhat.com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95206 13f79535-47bb-0310-9956-ffa450edef68
2002-05-21 15:40:51 +00:00
Jeff Trawick
c871b41d3c stop using APLOG_NOERRNO in calls to ap_log_?error()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95149 13f79535-47bb-0310-9956-ffa450edef68
2002-05-17 11:11:39 +00:00
William A. Rowe Jr
a43f5c4eb3 Introduced -E startup_logfile_name option to httpd to allow admins
to begin logging errors immediately.  This provides Win32 users
     an alternative to sending startup errors to the event viewer, and
     allows other daemon tool authors an alternative to logging to stderr.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94681 13f79535-47bb-0310-9956-ffa450edef68
2002-04-17 16:36:28 +00:00
William A. Rowe Jr
01ba81a1f4 Correct const'ness of argv in all support apps, and use the new
apr_app_initialize over apr_initialize for win32, and other platforms
  that may wish to tweak 'apr-ized' application support (e.g. Netware?)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94633 13f79535-47bb-0310-9956-ffa450edef68
2002-04-13 19:35:18 +00:00
Jim Jagielski
cc7157e782 Added support for Posix semaphore-based mutex locking (AcceptMutex posixsem).
It's between pthread and sysvsem in the DEFAULT priority ranking. This
makes it the new default for Darwin, and adds support for it for other
platforms as well (like Solaris).
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94434 13f79535-47bb-0310-9956-ffa450edef68
2002-04-04 18:36:03 +00:00