Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5693546
  • 博文数量: 409
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 8273
  • 用 户 组: 普通用户
  • 注册时间: 2013-10-23 19:15
个人简介

qq:78080458 学习交流群:150633458

文章分类

全部博文(409)

文章存档

2019年(127)

2018年(130)

2016年(20)

2015年(60)

2014年(41)

2013年(31)

分类: LINUX

2019-06-11 07:46:01

httpd

httpdapache超文本传输协议的主程序,它被设计成一个独立运行的守护进程。httpd会建立一个线程池来处理http请求。

此命令的适用范围:RedHatRHELUbuntuCentOSSUSEopenSUSEFedora

 

1、语法

httpd  [选项]

 

2、参数列表

选项

说明

-d serverroot

设置服务器根目录。对应配置文件中的ServerRoot指令

-f config

指定apache服务器的配置文件。如果配置文件不使用绝对路径,那么就是相对于ServerRoot的路径

-k

start|restart|graceful|stop|graceful-stop

httpd进程发送信息,可以控制httpd

-C

在读取配置文件之前,先处理指定的指令

-c

在读取配置文件之后,处理指定的指令

-D param

设置参数,它可以配合apache的配置文件中一起使用

-e level

设置日志等级

-E file

设置错误信息文件

-h

显示简短的说明选项

-l

显示静态编译的httpd模块列表

-L

显示apache服务配置文件中的指令列表

-M

显示httpd模块列表

-S

显示虚拟主机配置

-t

检查配置文件语法

-v

显示httpd版本

-V

显示编译时的配置参数和版本信息

-X

运行调试模式

 

3、实例

1)重启httpd服务 

[root@localhost ~]#httpd -k restart             //重启服务

You have new mail in /var/spool/mail/root

[root@localhost ~]#  

2)检测配置文件

[root@localhost ~]#httpd –t                     //检测配置文件,没有错误

httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName

Syntax OK

[root@localhost ~]# 

3)显示apache中的模块

[root@localhost ~]# httpd -M

httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName

Loaded Modules:

 core_module (static)

 mpm_prefork_module (static)

 http_module (static)

 so_module (static)

 auth_basic_module (shared)

 auth_digest_module (shared)

 authn_file_module (shared)

 authn_alias_module (shared)

 authn_anon_module (shared)

 authn_dbm_module (shared)

 

 

       做了一个Linux学习的平台,目前出来一个雏形,各位可以参考使用
      链接:  密码:n7bk 

阅读(9058) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~