Announcement

Collapse
No announcement yet.

mod_pagespeed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • mod_pagespeed

    What is mod_pagespeed

    mod_pagespeed is an apache module that automatically optimizes webpages which are writen in Javascript, HTML, CSS, and images. It does this by rewriting the resources using filters that implement web performance best practices.
    Webmasters and web developers can use mod_pagespeed in order to improve the performance of their web pages when serving content with the Apache HTTP Server.


    How to install mod_pagespeed on linux dedicated server.

    Mod_pagespeed needs mod_deflate to be loaded in Apache.

    Following are the steps to install mod_pagespeed with Apache v2.2 + CPanel server running on CentOS 5.5 (32-bit):


    [[email protected]]# cd /usr/src

    [[email protected] src]# wget https://dl-ssl.google.com/dl/linux/d...rrent_i386.rpm

    [[email protected] src]# mkdir mod-pagespeed

    [[email protected] src]# cd mod-pagespeed

    [[email protected] mod-pagespeed]# rpm2cpio ../mod-pagespeed-beta_current_i386.rpm | cpio -idmv

    you will get the result as


    ./etc/cron.daily/mod-pagespeed
    ./etc/httpd/conf.d/pagespeed.conf
    ./usr/lib/httpd/modules/mod_pagespeed.so
    ./var/mod_pagespeed/cache
    ./var/mod_pagespeed/files
    3135 blocks


    [[email protected] mod-pagespeed]# cp ./etc/httpd/conf.d/pagespeed.conf \
    /usr/local/apache/conf/

    [[email protected] mod-pagespeed]# cp ./usr/lib/httpd/modules/mod_pagespeed.so \
    /usr/local/apache/modules/

    [[email protected] mod-pagespeed]# chmod 755 /usr/local/apache/modules/mod_pagespeed.so


    [[email protected] mod-pagespeed]# mkdir /var/mod_pagespeed/{cache,files} -p

    [[email protected] mod-pagespeed]# chown nobody:nobody /var/mod_pagespeed/*


    Now edit /etc/httpd/conf/httpd.conf and add the line

    Include “conf/pagespeed.conf”

    then edit /usr/local/apache/conf/pagespeed.conf and update the paths as

    LoadModule pagespeed_module /usr/src/mod-pagespeed/usr/lib/httpd/modules/mod_pagespeed.so


    LoadModule deflate_module modules/mod_deflate.so



    Now restart apache service

    [[email protected] mod-pagespeed]# service httpd restart

  • #2
    Installed this but when have

    LoadModule deflate_module modules/mod_deflate.so

    and restart apache there is error

    Apache restart failed. Unable to load pid from pid file and no httpd process found in process list.

    If apache restart reported success but it failed soon after, it may be caused by oddities with mod_ssl.

    You should run /usr/local/cpanel/scripts/ssl_crt_status as part of your troubleshooting process. Pass it --help for more details.

    Also be sure to examine apache's various log files.
    Apache Restart Output:

    Log:
    [Mon Sep 19 12:16:33 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/local/apache/bin/suexec)
    [Mon Sep 19 12:16:33 2011] [notice] mod_hostinglimits:LVE mechanism enabled
    [Mon Sep 19 12:16:33 2011] [notice] ModSecurity for Apache/2.6.0 (ModSecurity: Open Source Web Application Firewall) configured.
    [Mon Sep 19 12:16:33 2011] [notice] ModSecurity: APR compiled version="1.4.5"; loaded version="1.4.5"
    [Mon Sep 19 12:16:33 2011] [notice] ModSecurity: PCRE compiled version="8.12"; loaded version="8.12 2011-01-15"
    [Mon Sep 19 12:16:33 2011] [notice] ModSecurity: LIBXML compiled version="2.7.8"
    [Mon Sep 19 12:16:33 2011] [warn] module pagespeed_module is already loaded, skipping
    [Mon Sep 19 12:16:34 2011] [warn] RSA server certificate CommonName (CN) `Hosting UK, cPanel Web Hosting, Website Hosting, Softaculous Hosting' does NOT match server name!?
    [Mon Sep 19 12:16:34 2011] [notice] mod_hostinglimits:LVE mechanism enabled
    [Mon Sep 19 12:16:34 2011] [notice] Apache/2.2.20 (Unix) mod_ssl/2.2.20 OpenSSL/0.9.8e-fips-rhel5 DAV/2 mod_bwlimited/1.4 configured -- resuming normal operations
    [Mon Sep 19 12:16:53 2011] [notice] caught SIGTERM, shutting down
    [email protected] [~]# service httpd restart
    [Mon Sep 19 12:17:20 2011] [warn] module pagespeed_module is already loaded, skipping
    httpd: Syntax error on line 36 of /usr/local/apache/conf/httpd.conf: module deflate_module is built-in and can't be loaded
    [email protected] [~]#
    So I have commented out the line for now

    #LoadModule deflate_module modules/mod_deflate.so

    What is wrong?
    cPanel Hosting | Fastest Hosting | WordPress Hosting | Web Hosting Forum

    Comment


    • #3
      I am working on your server with the problem you are facing with
      deflate_module modules/mod_deflate.so

      I will update you with the ticket AUH-888-47756 .

      Comment


      • #4
        Ok. Thanks.
        cPanel Hosting | Fastest Hosting | WordPress Hosting | Web Hosting Forum

        Comment


        • #5
          Hye HostXNow,

          Originally posted by HostXNow View Post
          [email protected] [~]# service httpd restart
          [Mon Sep 19 12:17:20 2011] [warn] module pagespeed_module is already loaded, skipping
          httpd: Syntax error on line 36 of /usr/local/apache/conf/httpd.conf: module deflate_module is built-in and can't be loaded
          [email protected] [~]#
          You already posted the solution to your problem

          There is NO deflate_module require for you.
          It has been compiled right into the apache binaries. Fire up your favorite
          editor, open httpd.conf and add a # at the beginning of
          line "LoadModule deflate_module modules/mod_deflate.so" . Then restart apache/httpd.

          you can check the loaded modules on your server with
          httpd -l

          or with simple php info function by creating below file in your public_html
          save below code with named phpinfo.php and check in browser.

          Code:
          <?
          phpinfo();
          ?>
          Regards,
          SilvesterJ

          Comment


          • #6
            Originally posted by Silvestercom View Post
            You already posted the solution to your problem

            There is NO deflate_module require for you.
            It has been compiled right into the apache binaries. Fire up your favorite
            editor, open httpd.conf and add a # at the beginning of
            line "LoadModule deflate_module modules/mod_deflate.so" . Then restart apache/httpd.
            Yeah, already did that as mentioned in previous post.

            All good now.
            cPanel Hosting | Fastest Hosting | WordPress Hosting | Web Hosting Forum

            Comment

            Working...
            X