{
    "content": [
        {
            "type": "text",
            "text": "# apachectl(8) (man)\n\n## TLDR\n\n> Control an Apache HTTP server.\n\n- Start the server:\n  `sudo apachectl start`\n- Restart the server:\n  `sudo apachectl restart`\n- Stop the server:\n  `sudo apachectl stop`\n- Test configuration file validity:\n  `apachectl configtest`\n- Check server status (requires the lynx browser):\n  `apachectl status`\n- Reload configuration without dropping connections:\n  `sudo apachectl graceful`\n- Print full Apache configuration (not always supported):\n  `apachectl -S`\n- Display help:\n  `apachectl -h`\n\n*Source: tldr-pages*\n\n---\n\n**Summary:** apache2ctl - Apache HTTP server control interface\n\n**Synopsis:** When acting in SysV init mode, apache2ctl takes simple, one-word commands, defined below.\napachectl command\napache2ctl command\nWhen  acting  in  pass-through  mode, apache2ctl can take all the arguments available for the\nhttpd binary.\napachectl [httpd-argument]\napache2ctl [httpd-argument]\n\n## See Also\n\n- apache2(8)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (13 lines)\n- **DESCRIPTION** (9 lines)\n- **OPTIONS** (45 lines)\n- **ENVIRONMENT** (5 lines)\n- **SEE ALSO** (6 lines)\n\n## Full Content\n\n### NAME\n\napache2ctl - Apache HTTP server control interface\n\n### SYNOPSIS\n\nWhen acting in SysV init mode, apache2ctl takes simple, one-word commands, defined below.\n\napachectl command\n\napache2ctl command\n\nWhen  acting  in  pass-through  mode, apache2ctl can take all the arguments available for the\nhttpd binary.\n\napachectl [httpd-argument]\n\napache2ctl [httpd-argument]\n\n### DESCRIPTION\n\napache2ctl is a front end to the Apache HyperText Transfer Protocol (HTTP) server.  It is de‐\nsigned to help the administrator control the functioning of the Apache apache2 daemon.\n\nNOTE:  The  default  Debian configuration requires the environment variables APACHERUNUSER,\nAPACHERUNGROUP, and APACHEPIDFILE to be set in /etc/apache2/envvars.\n\nThe apache2ctl script returns a 0 exit value on success, and >0 if an error occurs.  For more\ndetails, view the comments in the script.\n\n### OPTIONS\n\nThe command can be any one or more of the following options:\n\nstart         Start the Apache daemon.  Gives an error if it is already running.\n\nstop          Stops the Apache daemon.\n\nrestart       Restarts  the  Apache daemon by sending it a SIGHUP.  If the daemon is not run‐\nning, it is started.  This command automatically checks the configuration files\nvia  configtest  before  initiating  the restart to to catch  the  most obvious\nerrors.  However, it is still possible for the daemon to die because  of  prob‐\nlems with the configuration.\n\nfullstatus    Displays  a  full status report from modstatus.  For this to work, you need to\nhave modstatus enabled on your server and a text-based browser  such  as  lynx\navailable  on your system.  The URL used to access the status report can be set\nby setting the APACHESTATUSURL variable in /etc/apache2/envvars.\n\nstatus        Displays a brief status report. Similar to the fullstatus option,  except  that\nthe list of requests currently being served is omitted.\n\ngraceful      Gracefully  restarts  the Apache daemon by sending it a SIGUSR1.  If the daemon\nis not running, it is started.  This differs from a normal restart in that cur‐\nrently  open  connections are not aborted.  A side effect is that old log files\nwill not be closed immediately.  This means that if  used  in  a  log  rotation\nscript,  a  substantial delay may be necessary to ensure that the old log files\nare closed before processing them.  This command automatically checks the  con‐\nfiguration  files via apache2ctl configtest before initiating the restart to to\ncatch the most obvious errors.  However, it is still possible for the daemon to\ndie because of problems with the configuration.\n\ngraceful-stop Gracefully  stops  the Apache httpd daemon.  This differs from a normal stop in\nthat currently open connections are not aborted.  A side effect is that old log\nfiles will not be closed immediately.\n\nconfigtest    Run a configuration file syntax test. It parses the configuration files and ei‐\nther reports Syntax Ok or information about the particular syntax  error.  This\ntest does not catch all errors.\n\nhelp          Displays a short help message.\n\nThe following option was available in earlier versions but has been removed.\n\nstartssl      To start httpd with SSL support, you should edit your configuration file to in‐\nclude the relevant directives and then use the normal apache2ctl start.\n\n### ENVIRONMENT\n\nThe behaviour of apache2ctl can be influenced with these environment variables: APACHEHTTPD,\nAPACHELYNX,   APACHESTATUSURL,  APACHEULIMITMAXFILES,  APACHERUNDIR,  APACHELOCKDIR,\nAPACHERUNUSER, APACHEARGUMENTS, APACHEENVVARS.  See the comments in the  script  for  de‐\ntails.  These variables (except APACHEENVVARS) can be set in /etc/apache2/envvars.\n\n### SEE ALSO\n\napache2(8), /usr/share/doc/apache2/README.Debian.gz\n\n\n\n\nApril 2008                                apache2ctl(8)\n\n"
        }
    ],
    "structuredContent": {
        "command": "apachectl",
        "section": "8",
        "mode": "man",
        "summary": "apache2ctl - Apache HTTP server control interface",
        "synopsis": "When acting in SysV init mode, apache2ctl takes simple, one-word commands, defined below.\napachectl command\napache2ctl command\nWhen  acting  in  pass-through  mode, apache2ctl can take all the arguments available for the\nhttpd binary.\napachectl [httpd-argument]\napache2ctl [httpd-argument]",
        "tldr_summary": "Control an Apache HTTP server.",
        "tldr_examples": [
            {
                "description": "Start the server",
                "command": "sudo apachectl start"
            },
            {
                "description": "Restart the server",
                "command": "sudo apachectl restart"
            },
            {
                "description": "Stop the server",
                "command": "sudo apachectl stop"
            },
            {
                "description": "Test configuration file validity",
                "command": "apachectl configtest"
            },
            {
                "description": "Check server status (requires the lynx browser)",
                "command": "apachectl status"
            },
            {
                "description": "Reload configuration without dropping connections",
                "command": "sudo apachectl graceful"
            },
            {
                "description": "Print full Apache configuration (not always supported)",
                "command": "apachectl -S"
            },
            {
                "description": "Display help",
                "command": "apachectl -h"
            }
        ],
        "tldr_source": "official",
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "apache2",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/apache2/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 13,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 45,
                "subsections": []
            },
            {
                "name": "ENVIRONMENT",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 6,
                "subsections": []
            }
        ]
    }
}