CDN初学搭建(ats)

ats
trafficserver
squid

一、 CDN初学搭建

一、vagrant创建启动虚拟机

1.1vagrant 添加一个本地box

  1. root@liuqiang:/cdn# vagrant box add ats1 ats1_dev.box 

  2. ==> box: Box file was not detected as metadata. Adding it directly... 

  3. ==> box: Adding box 'ats1' (v0) for provider: 

  4. box: Unpacking necessary files from: file:///cdn/ats1_dev.box 

  5. ==> box: Successfully added box 'ats1' (v0) for 'virtualbox'! 

1.2 将添加好的box开机,此时看到显示正常。

CDN初学搭建(ats)-LMLPHP

enter description here

1.3 此时在virtualbox能看到创建的虚拟机ats

CDN初学搭建(ats)-LMLPHP

enter description here

二、访问ats没有映射的url

  1. root@liuqiang:/cdn# vagrant ssh ats1 

  2. Last login: Fri Jun 23 02:13:44 2017 from 10.0.2.2 

  1. [vagrant@localhost ~]$ sudo -i 

  2. [root@localhost ~]# 

  1. [root@localhost ats]# ./bin/trafficserver start 

  2. Starting Apache Traffic Server: [ OK ] 

#####预期结果

CDN初学搭建(ats)-LMLPHP

enter description here

三、测试修改源站配置添加url

3.1查看Log文件,最近一行中返回值为200,页面内容正常返

CDN初学搭建(ats)-LMLPHP

enter description here
05-17 05:17