Skip to content

Instantly share code, notes, and snippets.

@kezabelle
Created May 22, 2015 13:52
Show Gist options
  • Save kezabelle/e44fdde5df5e8414f7de to your computer and use it in GitHub Desktop.
Save kezabelle/e44fdde5df5e8414f7de to your computer and use it in GitHub Desktop.
Error messages I encountered while trying to get mod_pagespeed working in a Vagrant box where the guest's port80 is mapped to the hosts's 1080 ...

Errors

4xx status code, preventing rewriting of ...

Ok so for some reason pagespeed is doing a fetch (presumably an HTTP sub-request) but getting an invalid response. It would be useful to know which. 404 because it can't find the files? 403 because I've got the permissions wrong?

Fetch failed to start ...

I don't know what that means. I presume it was unable to even start what I expect is the same HTTP sub-request mechanism previously mentioned, but as debug messages go, I cannot even begin to guess at where the problem lies.

Fetch status not set when IsSafeToRewrite was called

I don't know what IsSafeToRewrite is. It's not a config setting that I put in, anywhere. I don't know what the fetch status could be, or should be. I don't know why those correlate, or which combination of invalid configuration settings might've caused them.

Caveats

So, I expect most of these were because I'm going host:1080 to guest:80, and guest:80 is attempting to do a sub-request to guest:1080 which fails. I've eventually managed to get the thing working by playing on an actual staging server and figuring out I wanted ModPagespeedMapOriginDomain and ModPagespeedLoadFromFileMatch, but the error messages output as part of the debug filter were worse than useless. In the case of the IsSafeToRewrite, the most information I could glean was by googling it and getting redirected to the source code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment