Chinaunix首页 | 论坛 | 博客
  • 博客访问: 21711
  • 博文数量: 7
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 80
  • 用 户 组: 普通用户
  • 注册时间: 2012-09-18 13:16
个人简介

皇家太医院不正常人类研究中心的重度患者

文章分类

全部博文(7)

文章存档

2015年(3)

2014年(4)

我的朋友

分类: 系统运维

2015-03-26 11:41:24

Apache软件的官方网站:
Apache是最流行的Web服务端软件之一,支持很多网页语言,如PHP、JSP等
使用命令:
  1. [root@bogon t]# yum install httpd -y
进行安装
安装完成之后,要想访问Web服务器需要先配置防火墙端口
使用命令:
  1. [root@bogon t]# vi /etc/sysconfig/iptables
编辑iptables,加入
  1. -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
启动Apache服务
  1. [root@bogon t]# service httpd start
在浏览器中访问Apache服务器

Apache其他常用命令
命令 说明
service httpd start 启动Apache服务
service httpd stop 停止Apache服务
service httpd restart 重启Apache服务
service httpd status 查看Apache服务状态

配置Apache服务

完整的配置手册,可参阅官方:docs/2.4/

连接时间【TimeOut】

描述:连接时间过长,会中断此连接
语法:TimeOut seconds
默认值:TimeOut 60
环境:server config, virtual host
状态: Core
模块: core

字符集【AddDefaultCharset Directive】

描述:配置网页默认字符集
语法:AddDefaultCharset On|Off|charset
默认值:AddDefaultCharset UTF-8
环境:server config, virtual host, directory, .htaccess
状态: Core
模块: core

  1. AddDefaultCharset UTF-8
索引页【DirectoryIndex】
描述:配置索引页
语法:DirectoryIndex disabled | local-url [local-url] ...
默认值:DirectoryIndex index.html
环境:server config, virtual host, directory, .htaccess
状态: Base
模块: mod_dir

  1. DirectoryIndex index.html index.htm index.php index.var
网站主目录【DocumentRoot】
描述:配置网站主目录
语法:DocumentRoot directory-path
默认值:DocumentRoot /usr/local/apache/htdocs
环境:server config, virtual host
状态: Core
模块: core
  1. DocumentRoot "/var/www/html"




































阅读(355) | 评论(0) | 转发(0) |
0

上一篇:建立Git仓库

下一篇:没有了

给主人留下些什么吧!~~