Apache installation Configuration Mod_pagespeed Acceleration Module _linux

Source: Internet
Author: User

Mod_pagespeed currently supports Apache and Nginx. The simple installation method in Apache is as follows. After the installation is complete, it will create a new installation source in the Yum, and then update it via Yum update.

install under Centos/fedora :

#32位
wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_i386.rpm
#64位
wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm
yum install at
rpm-u mod-pagespeed-*.rpm

install under Debina/ubuntu :

#32位
wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_i386.deb
#64位
wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.deb
Dpkg-i Mod-pagespeed-*.deb

Reboot httpd:

Service httpd Restart

To see if Pagespeed is loaded:

Httpd-m|grep Pagespeed

Configure Mod_pagespeed

Tips:mod_pagespeed needs Apache to load mod_deflate (a module that compresses Web content gzip).

32-bit please perform: wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_i386.rpm 64-bit please perform: wget https:// dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm Rpm2cpio./mod-pagespeed-stable_ current_i386.rpm | CPIO-IDMV./etc/cron.daily/mod-pagespeed./etc/httpd/conf.d/pagespeed.conf./etc/httpd/conf.d/pagespeed_ libraries.conf./usr/bin/pagespeed_js_minify./usr/lib/httpd/modules/mod_pagespeed.so./usr/lib/httpd/modules/mod _pagespeed_ap24.so./var/cache/mod_pagespeed./var/log/pagespeed 27020 blocks CP./usr/lib/httpd/modules/mod_ Pagespeed.so/usr/local/apache/modules/#apache版本 >=2.4.2, with pagespeed_ap24.so chmod 0755/usr/local/apache/modules /mod_pagespeed.so vim/usr/local/apache/conf/pagespeed.conf #新建配置文件, please modify LoadModule according to your own needs pagespeed_module/usr/local
  /apache/modules/mod_pagespeed.so <ifmodule pagespeed_module> modpagespeed on ModPagespeedInheritVHostConfig on Addoutputfilterbytype Mod_pagespeed_output_filter text/html ModpagespeedfilecaChepath "/var/cache/mod_pagespeed/" Modpagespeedfilecacheinodelimit 500000 Modpagespeedavoidrenamingintrospect Ivejavascript on modpagespeedenablefilters collapse_whitespace <Location/mod_pagespeed_beacon> SetHandler Mod_pagespeed_beacon </Location> <Location/mod_pagespeed_statistics> order Allow,deny allow from localhost Allow from 127.0.0.1 sethandler mod_pagespeed_statistics </Location> modpagespeedmessagebuffer Size 100000 <Location/mod_pagespeed_message> Allow from localhost Allow from 127.0.0.1 sethandler m Od_pagespeed_message </Location> </IfModule> mkdir-p/var/mod_pagespeed/chown-r Www.www/var/mod_pagespe
Ed/echo ' Include conf/pagespeed.conf ' >>/usr/local/apache/conf/httpd.conf/usr/local/apache/bin/apachectl-t
 Syntax OK Service httpd restart

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.