3 # Copyright (c) 2000-2002 The Apache Software Foundation.
4 # See license at the end of this file.
6 # Apache control script designed to allow an easy command line interface
7 # to controlling Apache. Written by Marc Slemko, 1997/08/23
9 # The exit codes returned are:
10 # XXX this doc is no longer correct now that the interesting
11 # XXX functions are handled by httpd
12 # 0 - operation completed successfully
15 # 3 - httpd could not be started
16 # 4 - httpd could not be stopped
17 # 5 - httpd could not be started during a restart
18 # 6 - httpd could not be restarted during a restart
19 # 7 - httpd could not be restarted during a graceful restart
20 # 8 - configuration syntax error
22 # When multiple arguments are given, only the error from the _last_
23 # one is reported. Run "apachectl help" for usage info
27 # |||||||||||||||||||| START CONFIGURATION SECTION ||||||||||||||||||||
28 # -------------------- --------------------
30 # the path to your httpd binary, including options if necessary
31 HTTPD='@exp_sbindir@/@progname@'
33 # pick up any necessary environment variables
34 if test -f @exp_bindir@/envvars; then
35 . @exp_bindir@/envvars
38 # a command that outputs a formatted text version of the HTML at the
39 # url given on the command line. Designed for lynx, however other
43 # the URL to your server's mod_status status page. If you do not
44 # have one, then status and fullstatus will not work.
45 STATUSURL="http://localhost:@PORT@/server-status"
47 # Set this variable to a command that increases the maximum
48 # number of file descriptors allowed per child process. This is
49 # critical for configurations that use many file descriptors,
50 # such as mass vhosting, or a multithreaded server.
51 ULIMIT_MAX_FILES="@APACHECTL_ULIMIT@"
52 # -------------------- --------------------
53 # |||||||||||||||||||| END CONFIGURATION SECTION ||||||||||||||||||||
55 # Set the maximum number of file descriptors allowed per child process.
56 if [ "x$ULIMIT_MAX_FILES" != "x" ] ; then
61 if [ "x$ARGV" = "x" ] ; then
66 start|stop|restart|graceful)
70 startssl|sslstart|start-SSL)
79 $LYNX $STATUSURL | awk ' /process$/ { print; exit } { print } '
91 # ====================================================================
92 # The Apache Software License, Version 1.1
94 # Copyright (c) 2000-2002 The Apache Software Foundation. All rights
97 # Redistribution and use in source and binary forms, with or without
98 # modification, are permitted provided that the following conditions
101 # 1. Redistributions of source code must retain the above copyright
102 # notice, this list of conditions and the following disclaimer.
104 # 2. Redistributions in binary form must reproduce the above copyright
105 # notice, this list of conditions and the following disclaimer in
106 # the documentation and/or other materials provided with the
109 # 3. The end-user documentation included with the redistribution,
110 # if any, must include the following acknowledgment:
111 # "This product includes software developed by the
112 # Apache Software Foundation (http://www.apache.org/)."
113 # Alternately, this acknowledgment may appear in the software itself,
114 # if and wherever such third-party acknowledgments normally appear.
116 # 4. The names "Apache" and "Apache Software Foundation" must
117 # not be used to endorse or promote products derived from this
118 # software without prior written permission. For written
119 # permission, please contact apache@apache.org.
121 # 5. Products derived from this software may not be called "Apache",
122 # nor may "Apache" appear in their name, without prior written
123 # permission of the Apache Software Foundation.
125 # THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
126 # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
127 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
128 # DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
129 # ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
130 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
131 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
132 # USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
133 # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
134 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
135 # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
137 # ====================================================================
139 # This software consists of voluntary contributions made by many
140 # individuals on behalf of the Apache Software Foundation. For more
141 # information on the Apache Software Foundation, please see
142 # <http://www.apache.org/>.
144 # Portions of this software are based upon public domain software
145 # originally written at the National Center for Supercomputing Applications,
146 # University of Illinois, Urbana-Champaign.