11.18 Apache用户认证


Linux学习笔记4月13日任务Linux学习笔记4月13日任务

编辑以下文件

Linux学习笔记4月13日任务Linux学习笔记4月13日任务

Linux学习笔记4月13日任务Linux学习笔记4月13日任务

然后,创建用户及密码

Linux学习笔记4月13日任务Linux学习笔记4月13日任务

-c,create创建文件,-m,md5加密;aming为自定义用户名;

第二次创建新用户,不用-c创建文件,已创建了;

然后,-t,再graceful;

Linux学习笔记4月13日任务Linux学习笔记4月13日任务

然后,绑定HOSTS,

Linux学习笔记4月13日任务Linux学习笔记4月13日任务

浏览器测试

Linux学习笔记4月13日任务Linux学习笔记4月13日任务

状态码为401,

Linux学习笔记4月13日任务Linux学习笔记4月13日任务

-u,指定用户和密码登录;密码错误状态码也会为401;

Linux学习笔记4月13日任务Linux学习笔记4月13日任务

指定文件admin.php;


11.19/11.20 域名跳转

Linux学习笔记4月13日任务

Linux学习笔记4月13日任务

域名跳转(也叫域名重定向),提升权重;301永久重定向;

!表示非,^以某某开头的;

改完配置文件,再检测加载

Linux学习笔记4月13日任务Linux学习笔记4月13日任务

Linux学习笔记4月13日任务Linux学习笔记4月13日任务

200正常;301永久重定向;403禁止访问;


11.21 Apache访问日志

Linux学习笔记4月13日任务

Linux学习笔记4月13日任务

日志目录及文件

Linux学习笔记4月13日任务Linux学习笔记4月13日任务

User-Agent用户代理,和浏览器有关的信息;

Referer记录浏览器上一次所访问的网址,从哪个网址进到现在的网址;如下:

Linux学习笔记4月13日任务Linux学习笔记4月13日任务


扩展 

apache虚拟主机开启php的短标签 http://ask.apelearn.com/question/5370