Question

Is there a way to set multiple domains VirtualHosts with Google Pagespeed module?

I've tried this with ModPagespeedDomain with one domain of mine but not sure how to go about multiple ones I have about 14 on one server

I've also tried ModPagespeedMapOriginDomain but this doesn't seem to help either. I basically want combine_javascript and combine_css to work with all sites. I already have filters set up in the config file

Était-ce utile?

La solution

ModPagespeed docs have a few examples for how to configure both server-wide and per VHost rewriters: https://developers.google.com/speed/pagespeed/module/configuration#virtual-hosts

Autres conseils

You should be able to use ModPagespeedDomain to tell mod_pagespeed which domains to rewrite. Are basic rewrites like CSS minification and image re-compression working for you?

In order to get combine_* to work across multiple domains, you'll probably have to use ModPagespeedMapRewriteDomain to move them into one domain. Something like:

ModPagespeedMapRewriteDomain one.domain.com/shard1/ shard1.domain.com
ModPagespeedMapRewriteDomain one.domain.com/shard2/ shard2.domain.com
ModPagespeedMapRewriteDomain one.domain.com/shard3/ shard3.domain.com
ModPagespeedMapRewriteDomain one.domain.com/shard4/ shard4.domain.com
...

Then all rewritten resources from shard*.domain.com will be rewritten into one.domain.com.

Please read the documentation carefully, there are some assumptions that need to be satisfied for this directive.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top