mod-pagespeed

How to get mod_pagespeed working with SSL


I've got mod_pagespeed installed under apache2/php5-fpm and it's working fine on my domain that isn't using SSL (it's combining css and js no probs), however when I access the SSL version of the same site, it no longer works. I've tried setting the variable:

ModPagespeedFetchHttps enable

But it still is not working. The site is behind basic auth security, would this matter?

I can see in the response headers under the SSL version of the site that mod_pagespeed is there, but it's not working it's magic.


Solution

  • Does accessing resources require authentication? If so, then mod_pagespeed probably is not able to access them (it just does an http fetch for resources to rewrite).

    Are the same resources available on http? If so, you're best bet might be MapOriginDomain:

    ModPagespeedMapOriginDomain http://www.example.com/ https://www.example.com/
    

    This will fetch all resources with HTTP even when the page is requested with HTTPS. So this would avoid the authentication issue.

    See also, https://developers.google.com/speed/pagespeed/module/https_support for more help with various HTTPS issues.