您的位置:首页 > 运维架构 > Apache

查看CentOS上Apache位置,版本,停止,启动

2016-03-01 08:56 489 查看
查看Apache是否被安装:

[root@asg11 ~]# find / -name 'httpd'
/etc/sysconfig/httpd
/etc/httpd
/etc/logrotate.d/httpd
/etc/rc.d/init.d/httpd
/var/run/httpd
/var/log/httpd
/var/lock/subsys/httpd
/usr/sbin/httpd
/usr/lib64/httpd

由此确定Apache被安装的地方是/etc/httpd

查看Apache版本

首先进入httpd所在目录
[root@asg11 ~]# cd /etc/httpd

进而查看版本
[root@asg11 httpd]# httpd -v
Server version: Apache/2.2.15 (Unix)
Server built: Aug 13 2013 17:29:28

停止httpd
[root@asg11 httpd]# service httpd stop
Stopping httpd: [ OK ]

启动httpd
[root@asg11 httpd]# service httpd start
Starting httpd: [ OK ]

用浏览器访问试试:



[root@asg11 httpd]#

Apache的重要配置文件httpd.conf的位置在/etc/httpd/conf/httpd.conf

[root@asg11 conf]# pwd
/etc/httpd/conf
[root@asg11 conf]# ls
httpd.conf magic
[root@asg11 conf]#
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: