查看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]#
[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]#
相关文章推荐
- Apache CXF自定义拦截器
- php的wamp服务器的wampapache启动时遇到80端口被system占用的解决方法
- win10搭建php开发环境(php7+mysql5.6+apache2.4)
- XAMPP中Apache因为端口原因不能启动的解决方法
- Apache Benchmark测试工具
- 【PHP项目部署四】Apache、PHP、Mysql整合
- 【PHP项目部署三】Apache环境配置
- apache hadoop安装
- Apache配置虚拟主机后,不能访问localhost的问题
- centos 更改apache默认的80端口为别的端口
- IT行业专业术语
- CentOS6.6下安装Redmine2.6(整合Apache2.4)
- JSONArray().fromObject(); 出现org.apache.catalina.core.StandardWrapperValve invoke错误的解决办法
- ubuntu14.04系统下在apache2.4服务器上设置虚拟主机
- apache的proxy代理总访问后端web的第一个虚拟主机
- apache安装方式
- Apache搭建负载均衡
- Apache服务器安装配置(win版)
- 安装 Apache 出现 <OS 10013> 以一种访问权限不允许的方式做了一个访问套接字的尝试
- apache 返回的状态码304