Search code examples
apachemod-pagespeed

Is it possible to change the base url in mod_pagespeed to use https


We are using Google PageSpeed module running on Apache, it is possible to configure it so that the base url uses https?

It currently outputs the following.

<noscript>
    <meta HTTP-EQUIV="refresh" content="0;url='http://example.com/?ModPagespeed=noscript'" />
    <style><!--table,div,span,font,p{display:none} --></style>
    <div style="display:block">Please click <a href="http://example.com/?ModPagespeed=noscript">here</a> if you are not redirected within a few seconds.</div>
</noscript>

It should be https://example.com - It there a setting inpagespeed.conf to correct this?


Solution

  • It turns out that the site was running behind a load balancer. All HTTPS requests were forwarded via HTTP. To correct the issue we needed to set

    ModPagespeedRespectXForwardedProto on
    

    The documentation for https support explains the process.