Monday, 3 June 2013

Drupal 7 - Installing and Configuring Apache Pagespeed module to enable basic optimizations

The open-source Apache Pagespeed module applies some sane basic optimizations to web pages:
      a) Combine and minify CSS files and blocks
      b) Combine and minify Javascript files and blocks
      c) Move all CSS above Javascript

1. Login to the Server
2. Download the pagespeed module
3. Extract the file
    dpkg -i mod-pagespeed-*.deb
4. Install it
    apt-get -f install
5. Restart the apache2 server
    service apache2 stop
    service apache2 restart
6. Disable & enable the pagespeed module to make sure that symlinks are created
    a2dismod pagespeed - To disable
    a2enmod pagespeed - To Enable
7. Restart the apache2 server
    service apache2 stop
    service apache2 restart
8. Put "ls" to check whether the page speed module is installed or not. we can find "mod-pagespeed-beta_current_amd64.deb"
9. Then put the core filters in the pagespeed.conf file and save it
    i. cd  /etc/apache2/mods-available
    ii. Here we will find "pagespeed.conf" edit that and paste the core filters under the enabled filters line.
    ModPagespeedEnableFilters add_head
    ModPagespeedEnableFilters combine_css
    ModPagespeedEnableFilters combine_javascript
    ModPagespeedEnableFilters convert_jpeg_to_progressive
    ModPagespeedEnableFilters convert_meta_tags
    ModPagespeedEnableFilters extend_cache
    ModPagespeedEnableFilters flatten_css_imports
    ModPagespeedEnableFilters inline_css
    ModPagespeedEnableFilters inline_import_to_link
    ModPagespeedEnableFilters inline_javascript
    ModPagespeedEnableFilters rewrite_css
    ModPagespeedEnableFilters rewrite_images
    ModPagespeedEnableFilters rewrite_javascript
    ModPagespeedEnableFilters rewrite_style_attributes_with_url

No comments:

Post a Comment

Thank you so much for providing your valuable feedback. I will will look into them and update my skills & technologies accordingly.