apachectl
apachectl
指令是apache http服务器的前端控制程序,可以协助控制apache服务的守护进程httpd。
此命令的适用范围:RedHat、RHEL、Ubuntu、CentOS、SUSE、openSUSE、Fedora。
1
、语法
apachectl cmd
2
、参数列表
选项
|
说明
|
start
|
启动apache httpd守护进程
|
restart
|
重启apache httpd守护进程
|
stop
|
停止apache httpd守护进程
|
status
|
显示apache服务的简要信息
|
graceful
|
优雅的重启apache服务,它和restart不一样,不会中断当前已经打开的http连接,不会立刻关闭日志
|
graceful-stop
|
优雅的停止apache服务,它和stop不一样,不会中断当前已经打开的http连接,不会立刻关闭日志
|
configtest
|
运行apache配置语法检测
|
3
、实例
1
)运行apache配置文件测试
[root@localhost ~]#
apachectl configtest //
配置文件检测,没有错误
httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName
Syntax OK
|
2
)重启服务
[root@localhost ~]#
apachectl restart //
重启
|
做了一个Linux学习的平台,目前出来一个雏形,各位可以参考使用
链接:https://pan.baidu.com/s/1GOLVU2CbpBNGtunztVpaCQ 密码:n7bk