首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >Redhat apache基本配置修改http.conf

Redhat apache基本配置修改http.conf

作者头像
苦咖啡
发布于 2018-05-07 16:46:53
发布于 2018-05-07 16:46:53
9010
举报
文章被收录于专栏:我的博客我的博客
  1. ServerTokens Prod #OS改为Prod屏蔽系统版本号显示
  2. DocumentRoot “/var/www/html” #这个是根目录
  3. # 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 All #这个是允许.htaccess文件本来是None
  4. #这个是检测是否用index页面 #<LocationMatch “^/$> #    Options -Indexes #    ErrorDocument 403 /error/noindex.html #</LocationMatch>
  5. ServerSignature Off #这个在错误页面也不显示apache的版本号
  6. Alias /icons/ “/var/www/icons/” <Directory “/var/www/icons”>     Options Indexes MultiViews #这个地方是控制是否在浏览器上显示树状目录,把Indexes MultiViews改成MultiViews是不显示     AllowOverride None     Order allow,deny     Allow from all </Directory>
  7. #AddDefaultCharset ISO-8859-1 #在这里可设置网页默认编码
  8. 这个地方是设置虚拟主机的 #<VirtualHost *> #    ServerAdmin webmaster@dummy-host.example.com #    DocumentRoot /www/docs/dummy-host.example.com #    ServerName dummy-host.example.com #    ErrorLog logs/dummy-host.example.com-error_log #    CustomLog logs/dummy-host.example.com-access_log common #</VirtualHost>
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2011年9月5日,如有侵权请联系 cloudcommunity@tencent.com 删除
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档