默认情况下apache的主目录
Server admin 联系管理员
Servername 一般主server不去添加
通过serverName 来区分不同的server
虚拟路径不加任何标号
实际路径才加标号
Opentios followsymlinks
Allowoverride none
indexes
循序软连接
没有访问控制
允许索引
访问控制
Deny from xxx
Allow form xxx
修改默认的出错页面
Etc/httpd/conf.d/welcome.conf
默认首页
directoryIndex
目录配置文件
accessfileName
一个文件的允许或拒绝
<file ~”^.ht”>
Deny from all
</file>
authName “xxxxxxxxxxx”
authType basic
authUserfile /etc/http/conf/mainuser
Require valid-user
创建认证文件
Htpasswd -c /etc/httpd/conf/mainuser username
虚拟目录
Alias /script “/www/xxx”
虚拟脚本目录
scriptAlias /script “/www/script”
注意selinux的上下文限制
chcon -R -t httpd_sys_content_t /xxx
日志
Access.log
上一篇:apache ab测试 下一篇:快递查询API