apache 重启命令
2017-01-10 10:52
302 查看
apachectlis a front end to the Apache HyperText Transfer Protocol (HTTP) server. It is designed to help the administrator control the functioning of
the Apache
httpddaemon.
The
apachectlscript can operate in two modes. First, it can act as a simple front-end to the
httpdcommand
that simply sets any necessary environment variables and then invokes
httpd,
passing through any command line arguments. Second,
apachectlcan act as a SysV init script, taking simple one-word arguments like
start,
restart,
and
stop, and translating them into appropriate signals to
httpd.
If your Apache installation uses non-standard paths, you will need to edit the
apachectlscript to set the appropriate paths to the
httpdbinary.
You can also specify any necessary
httpdcommand
line arguments. See the comments in the script for details.
The
apachectlscript returns a 0 exit value on success, and >0 if an error occurs. For more details, view the comments in the script.
Synopsis
Options
See also
Starting ApacheStopping Apache
Configuration Files
Platform Docs
httpd
Synopsis
When acting in pass-through mode, apachectlcan take all the arguments available for the
httpdbinary.
apachectl [ httpd-argument ]
When acting in SysV init mode,
apachectltakes simple, one-word commands, defined below.
apachectl command
Options
Only the SysV init-style options are defined here. Other arguments are defined on the httpdmanual
page.
startStart the Apache
httpddaemon.
Gives an error if it is already running. This is equivalent to
apachectl -k start.
stopStops the Apache
httpddaemon.
This is equivalent to
apachectl -k stop.
restartRestarts the Apache
httpddaemon.
If the daemon is not running, it is started. This command automatically checks the configuration files as in
configtestbefore initiating the restart to make sure the daemon doesn't
die. This is equivalent to
apachectl -k restart.
fullstatusDisplays a full status report from
mod_status.
For this to work, you need to have
mod_statusenabled
on your server and a text-based browser such as
lynxavailable on your system. The URL used to access the status report can be set by editing the
STATUSURLvariable
in the script.
statusDisplays a brief status report. Similar to the
fullstatusoption, except that the list of requests currently being served is omitted.
gracefulGracefully restarts the Apache
httpddaemon.
If the daemon is not running, it is started. This differs from a normal restart in that currently open connections are not aborted. A side effect is that old log files will not be closed immediately. This means that if used in a log rotation script, a substantial
delay may be necessary to ensure that the old log files are closed before processing them. This command automatically checks the configuration files as in
configtestbefore initiating
the restart to make sure Apache doesn't die. This is equivalent to
apachectl -k graceful.
configtestRun a configuration file syntax test. It parses the configuration files and either reports
Syntax Okor detailed information about the particular syntax
error. This is equivalent to
apachectl -t.
The following additional option is available, but deprecated.
startsslThis is equivalent to
apachectl -k start -DSSL. We recommend that you use that command explicitly, or you adjust your
httpd.confto
remove the
<IfDefine>section
so that SSL will always be available.
相关文章推荐
- linux 下 apache启动、停止、重启命令
- linux crontab命令 定时重启apache和mysql 相当实用
- linux 重启apache命令
- linux下apache启动、重启、停止的命令
- linux 下 apache启动、停止、重启命令
- linux下,重启apache的命令
- centos 下 apache 重启启动命令
- linux系统下apache服务的启动、停止、重启命令
- linux 下 apache启动、停止、重启命令
- 各linux版本重启apache命令
- 各linux版本重启apache命令
- ubuntu下开启,重启,停止apache服务器以及mysql命令命令
- linux下apache启动、停止、重启命令
- apache/nginx 启动、停止、重启命令
- linux 下 apache启动、停止、重启命令
- linux 下 apache启动、停止、重启命令
- linux的apache web服务器启动、停止及重启命令
- linux 下 apache启动、停止、重启命令
- apache与和mysql重启命令
- linux 下 apache启动、停止、重启命令