日期:2014-05-17  浏览次数:20825 次

Apache(二)启动/停止 工具介绍

启动/停止Apache HttpServer

?

一、进入目录prefix/bin

?

通过执行?apachectl?控制apache;apachectl在运行时会设置一些必要的环境变量信息,以保证

?

httpd能正确的运行,然后再调用httpd。

?

二、修改prefix/conf/httpd.conf

?

把ServerName取消注释,并设置ServerName的值

?

三、apachectl(httpd)的部分运行参数

?

若apache配置为开机启动,则参数设置:http://httpd.apache.org/docs/2.4/programs/apachectl.html

?

若手动启动apache,则参数设置:http://httpd.apache.org/docs/2.4/programs/httpd.html

?

-f ?指定配置文件,默认文件是 prefix/conf/httpd.conf

?

start ?| restart | graceful | stop | graceful-stop ?

?

四、访问

?

可通过IP访问,默认会显示 It works!

?

?

五、Apache HTTP服务器与支持程序

http://httpd.apache.org/docs/2.4/programs/