We are running mod-pagespeed on serveral apache nodes behind a varnish wich sits behind an ngnix which handles https
.
So all request arrive apache as http
but with an extra x-proto header.
PageSpeed works fine on http
and rewrites urls to the desired cdn domain, yet fails to do so in https
requests.
The settings:
ModPagespeedRespectXForwardedProto on
ModPagespeedDomain mycdn.azureedge.net
ModPagespeedMapRewriteDomain mycdn.azureedge.net *mydomain.com
where mycdn.azureedge.net is the cdn and anything mydomain.com is my website.
My complete mod_pagespeed config can be found here.
If i do set ModPagespeedRespectXForwardedProto
to off
, for https
requests, links are rewritten to the cdn but with http
as the protocol.
I did set up a local machine (with docker) to test this localy and have the same problem. Thou Pagespeed works fine for http, urls are not rewritten for https. If i use debug filter, the debug information is added even in https requests so Pagespeed is definitively running for both protocols.
I added the stats_log_global output as a pastebin here and the debug log output from the html here as well.
How do i get pageSpeed to rewrite those urls on https requests as well?