3 # Licensed to the Apache Software Foundation (ASF) under one or more
4 # contributor license agreements. See the NOTICE file distributed with
5 # this work for additional information regarding copyright ownership.
6 # The ASF licenses this file to You under the Apache License, Version 2.0
7 # (the "License"); you may not use this file except in compliance with
8 # the License. You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
19 # Apache control script designed to allow an easy command line interface
20 # to controlling Apache. Written by Marc Slemko, 1997/08/23
22 # The exit codes returned are:
23 # XXX this doc is no longer correct now that the interesting
24 # XXX functions are handled by httpd
25 # 0 - operation completed successfully
28 # 3 - httpd could not be started
29 # 4 - httpd could not be stopped
30 # 5 - httpd could not be started during a restart
31 # 6 - httpd could not be restarted during a restart
32 # 7 - httpd could not be restarted during a graceful restart
33 # 8 - configuration syntax error
35 # When multiple arguments are given, only the error from the _last_
36 # one is reported. Run "apachectl help" for usage info
41 # |||||||||||||||||||| START CONFIGURATION SECTION ||||||||||||||||||||
42 # -------------------- --------------------
44 # the path to your httpd binary, including options if necessary
45 HTTPD
='@exp_sbindir@/@progname@'
47 # pick up any necessary environment variables
48 if test -f @exp_sbindir@
/envvars
; then
49 . @exp_sbindir@
/envvars
52 # a command that outputs a formatted text version of the HTML at the
53 # url given on the command line. Designed for lynx, however other
55 LYNX
="@LYNX_PATH@ -dump"
57 # the URL to your server's mod_status status page. If you do not
58 # have one, then status and fullstatus will not work.
59 STATUSURL
="http://localhost:@PORT@/server-status"
61 # Set this variable to a command that increases the maximum
62 # number of file descriptors allowed per child process. This is
63 # critical for configurations that use many file descriptors,
64 # such as mass vhosting, or a multithreaded server.
65 ULIMIT_MAX_FILES
="@APACHECTL_ULIMIT@"
66 # -------------------- --------------------
67 # |||||||||||||||||||| END CONFIGURATION SECTION ||||||||||||||||||||
69 # Set the maximum number of file descriptors allowed per child process.
70 if [ "x$ULIMIT_MAX_FILES" != "x" ] ; then
75 if [ "x$ARGV" = "x" ] ; then
80 start|stop|restart|graceful|graceful-stop
)
84 startssl|sslstart|start-SSL
)
85 echo The startssl option is no longer supported.
86 echo Please edit httpd.conf to include the SSL configuration settings
87 echo and
then use
"apachectl start".
95 $LYNX $STATUSURL |
awk ' /process$/ { print; exit } { print } '