前端性能 - webpagetest

1、环境搭建

apache服务搭建参照之前文章:http://blog.csdn.net/weilan100/article/details/51077311(本次采用rpm自动安装版)

下载webpagetest安装文件,cp服务端文件到apache的DocumentRoot下

检查需要包安装情况

php (需要libxml2包)php --ini查看本机php服务安装目录 

需要的apache模板组件 apache安装目录下的modules/libphp5.so

2、修改配置文件:

添加加载模板组件 LoadModule php5_module modules/libphp5.so

添加使用php服务 PHPIniDir "/usr/local/lib" (查找php安装目录 php --ini php.ino文件位置)

#解析php文件
<FilesMatch \.php$>

SetHandler application/x-httpd-php

</FilesMatch>

<FilesMatch "\.ph(p[2-6]?|tml)$">
SetHandler application/x-httpd-php

</FilesMatch>


增加index文件:index.php index.php3

3、agent配置信息

server端:将webpagetest/settings目录下的sample文件拷贝一份去掉.sample

     修改 webpagetest/settings/locations.ini

agent端:wptdriver.ini.sample cp为wptdriver.ini 修改url地址&&location字段

location.ini(二级目录) 与 wptDriver.ini 的 location

========================

[locations]

1=local-WPTDriver

default=local-WPTDriver

; These are the top-level locations that are listed in the location dropdown

; Each one points to one or more browser configurations

[local-WPTDriver]

1= local   

label="local-WPTDriver"

group=Public

; Tese are the browser-specific configurations that match the configurations

; defined in the top-level locations.  Each one of these MUST match the location

; name configured on the test agent (urlblast.ini or wptdriver.ini)

==================================


4、文档目录

log文件:webpagetest/logs

5、排查问题

查看php部署参数:

<?

   phpinfo();

?>

查看webpagetest部署情况:http://ip:port/install/

查看agent链接情况:http://ip:port/?hidden=1(排除server的agent配置问题)

6、具体使用

参照之前上传文档:http://wenku.baidu.com/view/e0ffe9e4e2bd960590c677d8

Q&A

1、只显示文字 没有样式  只是访问到文件目录

错误信息:/var/www/html/js, referer: http://192.168.117.97:8080/webpagetest/

File does not exist: /var/www/html/js, referer: http://192.168.117.97:8080/webpagetest/

File does not exist: /var/www/html/images, referer: http://192.168.117.97:8080/webpagetest

修改 DocumentRoot "/var/www/html/webpagetest" 为webpagetest下 ,webpagetest中的js、css等文件是基于documentroot目录来查找。




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值