centos apache httpd.conf文件初始化配置

来源:互联网 发布:男朋友很厉害体验知乎 编辑:程序博客网 时间:2024/06/05 03:34

Options Indexes FollowSymLinks        在331行 修改为:Options Includes ExecCGI FollowSymLinks(允许服务器执行CGI及SSI)

   #AddHandler cgi-script .cgi        在796行 修改为:AddHandler cgi-script .cgi .pl (允许扩展名为.pl的CGI脚本运行)

   AllowOverride None          在338行 修改为:AllowOverride All (允许.htaccess)

   AddDefaultCharset UTF-8         在759行 修改为:AddDefaultCharset GB2312 (添加GB2312为默认编码)

 Options Indexes MultiViews          找到这一行,将“Indexes”删除 ,变为此状态 Options MultiViews (不在浏览器上显示树状目录结构)

   DirectoryIndex index.html index.html.var          在 402行 修改为:DirectoryIndex index.html index.htm Default.html Default.htm index.php Default.php index.html.var  (设置默认首页文件,增加index.php)

   KeepAlive Off           在76行 修改为:KeepAlive On (允许程序性联机)

   MaxKeepAliveRequests 100          在83行 修改为:MaxKeepAliveRequests 1000 (增加同时连接数)  

:wq!  #保存退出


重启

0 0
原创粉丝点击