我有一个CentOS (5.7Final)系统,我已经安装了Apache2.2.3。
我按照关于: mod_pagespeed的说明安装了http://code.google.com/speed/page-speed/download.html,并在安装时获得了以下信息:
# rpm -U mod-pagespeed-*.rpm
warning: mod-pagespeed-beta_current_x86_64.rpm: Header V4 DSA signature: NOKEY, key ID 7fac5991
[ OK ] atd: [ OK ]它似乎确实安装得很好:
# apachectl -t -D DUMP_MODULES
Loaded Modules:
...
pagespeed_module (shared)并且我在/etc/httpd/con.d/pagspeed.conf中做了以下修改
添加:
ModPagespeedEnableFilters collapse_whitespace,elide_attributes
ModPagespeedEnableFilters combine_css,rewrite_css,move_css_to_head,inline_css
ModPagespeedEnableFilters rewrite_javascript,inline_javascript
ModPagespeedEnableFilters rewrite_images,insert_img_dimensions
ModPagespeedEnableFilters extend_cache
ModPagespeedEnableFilters remove_quotes,remove_comments
ModPagespeedEnableFilters add_instrumentation在mod_pagespeed_statistics中注释掉下列行
<Location /mod_pagespeed_statistics>
**# Order allow,deny**
# You may insert other "Allow from" lines to add hosts you want to
# allow to look at generated statistics. Another possibility is
# to comment out the "Order" and "Allow" options from the config
# file, to allow any client that can reach your server to examine
# statistics. This might be appropriate in an experimental setup or
# if the Apache server is protected by a reverse proxy that will
# filter URLs in some fashion.
**# Allow from localhost**
**# Allow from 127.0.0.1**
SetHandler mod_pagespeed_statistics
</Location>作为一个单独的注意,我试图运行指定的系统测试谷歌的网站,但它提供了以下错误。我不喜欢更新服务器上的wget,因为我确信没有必要让实际模块正常工作。
./system_test.sh www.domain.com
You have the wrong version of wget. 1.12 is required.发布于 2011-12-21 02:13:20
我在一个mod_pagespeed系统上安装CentOS时遇到了一个问题,它只是在安装后拒绝工作。
事实证明,特定文件夹存在权限/所有权访问问题(S)。
在/var/www/中存在:
drwxr-xr-x 4 root root 4096 Dec 8 12:02 mod_pagespeed
drwxr-xr-x 2 root root 4096 Dec 8 12:03 mod_pagespeedcache我将权限更改为:
drwxr-xr-x 4 apache apache 4096 Dec 8 12:02 mod_pagespeed
drwxr-xr-x 4 apache apache 4096 Dec 10 13:10 mod_pagespeedcache日志显示:
...
[Sat Dec 10 13:08:43 2011] [error] [mod_pagespeed 0.10.19.4-1209 @30739] /var/www/mod_pagespeedcache/XAM3DOzfwmGm-DkPVUC7.outputlock:0: creating dir (code=13 Permission denied)
...在那之后工作得很好。
https://serverfault.com/questions/334469
复制相似问题