CentOS 5.6 快速搭建LAMP(2)

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

Setting up repositories
....................................
Complete!
接下来配置apache,编辑Apache的配置文件,命令行下:vi /etc/httpd/conf/httpd.conf
#
# Don't give away too much information about all the subcomponents
# we are running. Comment out this line if you don't mind remote sites
# finding out what major optional modules you are running
ServerTokens OS  ← 找到这一行,将“OS”改为“Prod”(在出现错误页的时候不显示服务器操作系统的名称)

ServerTokens Prod   ← 变为此状态
#
# Optionally add a line containing the server version and virtual host
# name to server-generated pages (internal error documents, FTP directory
# listings, mod_status and mod_info output etc., but not CGI generated
# documents or custom error documents).
# Set to "EMail" to also include a mailto: link to the ServerAdmin.
# Set to one of: On | Off | EMail
#
ServerSignature On  ← 找到这一行,将“On”改为“Off”

ServerSignature Off  ← 在错误页中不显示Apache的版本
#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If this is not set to valid DNS name for your host, server-generated
# redirections will not work. See also the UseCanonicalName directive.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address anyway, and this will make
# redirections work in a sensible way.
#
#ServerName new.host.name:80  ← 修改主机名

ServerName www.linuxidc.com:80  ← 根据实际情况修改,端口号保持默认的80
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs-2.0/mod/core.html#options
# for more information.
#
DirectoryIndex index.html index.html.var       ←找到这一行,
DirectoryIndex index.html index.php               ← 添加默认index.php文件

Options Indexes FollowSymLinks  ← 找到这一行,删除“Indexes”,并添加“Includes”、“ExecCGI”

Options Includes ExecCGI FollowSymLinks  ← 允许服务器执行CGI及SSI
#
# AddHandler allows you to map certain file extensions to "handlers":

发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
用户名: 验证码:点击我更换图片
最新评论 更多>>

推荐热点

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

快速直达

操作系统导航

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

豫ICP备11007008号-1