Chinaunix首页 | 论坛 | 博客
  • 博客访问: 10479734
  • 博文数量: 2905
  • 博客积分: 20098
  • 博客等级: 上将
  • 技术积分: 36298
  • 用 户 组: 普通用户
  • 注册时间: 2009-03-23 05:00
文章存档

2012年(1)

2011年(3)

2009年(2901)

分类: LINUX

2009-03-23 11:14:24

一、Apache的安装
首先使用下面的命令来查看系统是否已经安装了Apache
可看到已经安装好了。
另外也可以在终端窗口中执行来查看httpd程序是否在执行。
下面介绍Apache服务器文件和目录
WEB站点目录                                                                           描述
/var/www                           Apache WEB站点文件的目录
/var/www/html                 WEB站点的WEB文件
/var/www/cgi-bin             CGI程序文件
/var/www/html/manual   Apache WEB服务器手册
/var/www/htmll/usage    webalizer程序文件
 
配置文件
/etc/httpd/conf     基于目录的配置文件,.htaccess文件包含对它所在目录中文件的访问控制指令
/etc/httpd/conf/httpd.conf   Apache WEB服务器配置文件目录
/etc/httpd/conf/srm.conf       主要的Apache WEB服务器配置文件
/etc/httpd/conf/access.conf   用来处理文档规范,配置文件类型昨未知的老式配置文件
 
启动脚本
/etc/rc.d/init.d/httpd        WEB服务器守护进程的启动脚本
/etc/rc.d/rc3.d/S85httpd   将运行级目录(/etc/rc3.d)连接到目录/etc/rc.d/init.d中的启动脚本
 
应用文件
/usr/sbin      Apache WEB服务器程序文件和应用程序的位置
/usr/doc/   Apache WEB服务器文档
/var/log/http  Apache 日志文件的位置
 
二、启动和运行Apache服务器
其中一种是:
另处一种是:
httpd除了start\stop命令之外,还有reload,condrestant,status命令,共6种状态
 
三.启动系统时自动运行Apache
若想让系统自动执行Apache,只需执行setup命令,进行Text Mode Setup Utility界面,选中System services中的:httpd服务"即可.
当然,还有一种更方便的图形化方法.选择"应用程序/系统设置/服务器设置/服务/
四.httpd.conf文件详细和配置
旧版中的srm.conf与access.conf文件的内容都被整合到httpd.conf文件中了.
 
#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See <
阅读(1711) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~