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