11b0ed9
11b0ed9
11b0ed9
  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">[
11b0ed9
11b0ed9
]>
11b0ed9
73594f6
 Copyright 2020 Red Hat, Inc.
11b0ed9
11b0ed9
 Licensed to the Apache Software Foundation (ASF) under one or more
11b0ed9
 contributor license agreements. See the NOTICE file distributed with
11b0ed9
 this work for additional information regarding copyright ownership.
11b0ed9
 The ASF licenses this file to You under the Apache License, Version 2.0
11b0ed9
 (the "License"); you may not use this file except in compliance with
11b0ed9
 the License. You may obtain a copy of the License at
11b0ed9
11b0ed9
     http://www.apache.org/licenses/LICENSE-2.0
11b0ed9
11b0ed9
 Unless required by applicable law or agreed to in writing, software
11b0ed9
 distributed under the License is distributed on an "AS IS" BASIS,
11b0ed9
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11b0ed9
 See the License for the specific language governing permissions and
11b0ed9
 limitations under the License.
11b0ed9
-->
11b0ed9
<refentry>
11b0ed9
  <refentryinfo>
11b0ed9
    <title>apachectl</title>
11b0ed9
    <productname>httpd</productname>
289df82
    <author><contrib>Apache man page</contrib><othername>Apache Software Foundation contributors</othername></author>
289df82
    <author><contrib>Fedora man page</contrib><surname>Dana</surname><firstname>Frank</firstname></author>
11b0ed9
  </refentryinfo>
11b0ed9
11b0ed9
  <refmeta>
11b0ed9
    <refentrytitle>apachectl</refentrytitle>
11b0ed9
    <manvolnum>8</manvolnum>
11b0ed9
  </refmeta>
11b0ed9
11b0ed9
  <refnamediv>
11b0ed9
    <refname>apachectl</refname>
11b0ed9
    <refpurpose>Server control interface for httpd</refpurpose>
11b0ed9
  </refnamediv>
11b0ed9
11b0ed9
  <refsynopsisdiv id='synopsis'>
11b0ed9
    <cmdsynopsis>
11b0ed9
      <command>apachectl</command>
11b0ed9
      <arg choice='opt'><replaceable>command</replaceable> </arg>
11b0ed9
      <sbr/>
11b0ed9
    </cmdsynopsis>
11b0ed9
  </refsynopsisdiv>
11b0ed9
11b0ed9
11b0ed9
  <refsect1 id='description'>
73594f6
    <title>Description</title>
11b0ed9
11b0ed9
    <para><command>apachectl</command> is a front end to the Apache HyperText
11b0ed9
    Transfer Protocol (HTTP) server. It is designed to help the
11b0ed9
    administrator control the functioning of the Apache
11b0ed9
    <command>httpd</command> daemon.</para>
11b0ed9
11b0ed9
    <para>The <command>apachectl</command> script takes one-word arguments like
11b0ed9
    <option>start</option>,
11b0ed9
    <option>restart</option>, and
11b0ed9
    <option>stop</option>, and translates them
11b0ed9
    into appropriate signals to <command>httpd</command>.</para>
11b0ed9
11b0ed9
    <para>The <command>apachectl</command> script returns a 0 exit value on
11b0ed9
    success, and >0 if an error occurs.</para>
11b0ed9
73594f6
    <refsect2 id="compatibility">
73594f6
      <title>Compatibility</title>
73594f6
73594f6
      <para>The version of <command>apachectl</command> used on this
73594f6
      system is a replacement script intended to be mostly (but not
73594f6
      completely) compatible with version provided with
73594f6
      <emphasis>Apache httpd</emphasis>.  This
73594f6
      <command>apachectl</command> mostly acts as a wrapper around
73594f6
      <command>systemctl</command> and manipulates the
73594f6
      <command>systemd</command> service for <command>httpd</command>.
73594f6
      The interface to the <emphasis>Apache</emphasis> version of
73594f6
      <command>apachectl</command> is described at 
73594f6
      url="https://httpd.apache.org/docs/2.4/programs/apachectl.html"/>.</para>
73594f6
73594f6
      <para>The following differences are present in the version of
73594f6
      <command>apachectl</command> present on this system:
73594f6
73594f6
      <itemizedlist>
73594f6
        <listitem><para>Option arguments passed when starting
73594f6
        <command>httpd</command> are not allowed.  These should be
73594f6
        configured in the systemd service directly (see <citerefentry><refentrytitle>httpd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>).</para></listitem>
73594f6
73594f6
        <listitem><para>The <command>"fullstatus"</command> option is
73594f6
        not available.</para></listitem>
73594f6
73594f6
        <listitem><para>The <command>"status"</command> option does
73594f6
        not use or rely on the running server's
73594f6
        <emphasis>server-status</emphasis> output.</para></listitem>
73594f6
      </itemizedlist>
73594f6
73594f6
      </para>
73594f6
    </refsect2>
11b0ed9
  </refsect1>
11b0ed9
11b0ed9
  <refsect1 id='options'>
73594f6
    <title>Options</title>
11b0ed9
    <variablelist remap='TP'>
11b0ed9
      <varlistentry>
11b0ed9
        <term><option>start</option></term>
11b0ed9
        <listitem>
11b0ed9
          <para>Start the Apache <command>httpd</command> daemon. Gives an error if it
11b0ed9
          is already running. This is equivalent to <command>systemctl start httpd.service</command>.</para>
11b0ed9
        </listitem>
11b0ed9
      </varlistentry>
11b0ed9
11b0ed9
      <varlistentry>
11b0ed9
        <term><option>stop</option></term>
11b0ed9
        <listitem>
11b0ed9
          <para>Stops the Apache <command>httpd</command> daemon. This is equivalent to
11b0ed9
          <command>systemctl stop httpd.service</command>.</para>
11b0ed9
        </listitem>
11b0ed9
      </varlistentry>
11b0ed9
11b0ed9
      <varlistentry>
11b0ed9
        <term><option>restart</option></term>
11b0ed9
        <listitem>
11b0ed9
          <para>Restarts the Apache <command>httpd</command> daemon. If the daemon is
11b0ed9
          not running, it is started. This is equivalent
11b0ed9
          to <command>systemctl restart httpd.service</command>.</para>
11b0ed9
        </listitem>
11b0ed9
      </varlistentry>
11b0ed9
11b0ed9
      <varlistentry>
11b0ed9
        <term><option>status</option></term>
11b0ed9
        <listitem>
11b0ed9
          <para>Displays a brief status report. This is equivalent to <command>systemctl status httpd.service.</command></para>
11b0ed9
        </listitem>
11b0ed9
      </varlistentry>
11b0ed9
11b0ed9
      <varlistentry>
11b0ed9
        <term><option>graceful</option></term>
11b0ed9
        <listitem>
11b0ed9
          <para>Gracefully restarts the Apache <command>httpd</command> daemon. If the
11b0ed9
          daemon is not running, it is started. This differs from a normal
11b0ed9
          restart in that currently open connections are not aborted. A side
11b0ed9
          effect is that old log files will not be closed immediately. This
11b0ed9
          means that if used in a log rotation script, a substantial delay may
11b0ed9
          be necessary to ensure that the old log files are closed before
11b0ed9
          processing them. This is equivalent to
11b0ed9
          <command>systemctl kill --signal=SIGUSR1 --kill-who=main httpd.service</command>.</para>
11b0ed9
        </listitem>
11b0ed9
      </varlistentry>
11b0ed9
11b0ed9
      <varlistentry>
11b0ed9
        <term><option>graceful-stop</option></term>
11b0ed9
        <listitem>
11b0ed9
          <para>Gracefully stops the Apache <command>httpd</command> daemon.
11b0ed9
          This differs from a normal stop in that currently open connections are not
11b0ed9
          aborted. A side effect is that old log files will not be closed immediately.
11b0ed9
          This is equivalent to
11b0ed9
          <command>systemctl kill --signal=SIGWINCH --kill-who=main httpd.service</command>.</para>
11b0ed9
        </listitem>
11b0ed9
      </varlistentry>
11b0ed9
11b0ed9
      <varlistentry>
11b0ed9
        <term><option>configtest</option></term>
11b0ed9
        <listitem>
11b0ed9
          <para>Run a configuration file syntax test. It parses the configuration
73594f6
          files and either reports <literal>Syntax OK</literal>
11b0ed9
          or detailed information about the particular syntax error. This is
11b0ed9
          equivalent to <command>httpd -t</command>.</para>
11b0ed9
        </listitem>
11b0ed9
      </varlistentry>
11b0ed9
    </variablelist>
11b0ed9
  </refsect1>
11b0ed9
11b0ed9
  <refsect1 id='bugs'>
73594f6
    <title>Bugs</title>
73594f6
    <para>Please report bugs by filing an issue in Bugzilla via <ulink url='https://bugzilla.redhat.com/'/>.</para>
73594f6
  </refsect1>
73594f6
73594f6
    <refsect1>
73594f6
    <title>See also</title>
73594f6
73594f6
    <para>
73594f6
    <citerefentry><refentrytitle>httpd</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
73594f6
    <citerefentry><refentrytitle>httpd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
73594f6
    <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
73594f6
    <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
73594f6
    <citerefentry><refentrytitle>httpd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
73594f6
    </para>
11b0ed9
  </refsect1>
11b0ed9
11b0ed9
</refentry>