CentOS 5.6 快速搭建LAMP(3)

来源:未知 责任编辑:责任编辑 发表时间:2014-03-23 22:30 点击:

# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
#AddHandler cgi-script .cgi  ← 找到这一行,去掉行首的“#”,并在行尾添加“.pl”

AddHandler cgi-script .cgi .pl  ← 允许扩展名为.pl的CGI脚本运行
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None  ← 找到这一行,将“None”改为“All”

AllowOverride All  ← 变为此状态,允许.htaccess
#
# Specify a default charset for all pages sent out. This is
# always a good idea and opens the door for future internationalisation
# of your web site, should you ever want it. Specifying it as
# a default does little harm; as the standard dictates that a page
# is in iso-8859-1 (latin1) unless specified otherwise i.e. you
# are merely stating the obvious. There are also some security
# reasons in browsers, related to javascript and URL parsing
# which encourage you to always set a default char set.
#
AddDefaultCharset UTF-8  ← 找到这一行,在行首添加“#”

#AddDefaultCharset UTF-8  ← 不使用UTF-8作为网页的默认编码
AddDefaultCharset GB2312  ← 并接着添加这一行(添加GB2312为默认编码)
<Directory "/var/www/icons">  ← 找到这一个标签,并在标签中更改相应选项
Options Indexes MultiViews  ← 找到这一行,将“Indexes”删除

Options MultiViews   ← 变为此状态(不在浏览器上显示树状目录结构)
AllowOverride None
Order allow,deny
Allow from all
</Directory>
命令行下:  chkconfig httpd on  ← 设置HTTP服务自启动
                     chkconfig --list httpd
                     httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off   ← 确认2--5为on的状态就OK
                      /etc/rc.d/init.d/httpd start  ← 启动HTTP服务
                     Starting httpd:              [ OK ] ← 启动成功会出现OK
在浏览器浏览http://127.0.0.1  就可以看到测试页面出现,表示安装成功。3.安装php
命令行下:yum -y install php
Setting up Install Process
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
用户名: 验证码:点击我更换图片
最新评论 更多>>

推荐热点

  • /etc/fstab 详解
  • nginx主主集群
  •  LVS-NAT和LVS-DR模式的实现详解
  •  RHCE考试之磁盘配额
  • 学习笔记:ACL详解
  • suse linux双网卡双网关配置
  •  LVM逻辑卷管理器
  •  Nginx主主负载均衡架构
  • ubuntu学习Mysql

快速直达

操作系统导航

LinuxWindows虚拟机
网站首页 - 友情链接 - 网站地图 - TAG标签 - RSS订阅 - 内容搜索
Copyright © 2008-2015 计算机技术学习交流网. 版权所有

豫ICP备11007008号-1