It all depends on what you're trying to accomplish.
ModPagespeedDomain
directives work if you have mod_pagespeed installed on all three domains (for example, if they are all just separateVirtualHost
s on the same machine.). This will rewrite all resources on all 3 domains no matter which one the HTML is loaded from. Do not use these directives if mod_pagespeed is not running on the 3 resource domains.ModPagespeedMapProxyDomain
will rewrite URLs from these 3 domains intowww.example.com
. You would usually use this if you do not have mod_pagespeed installed on the 3 resource domains, but you do onwww.example.com
. Note: You probably want something more like:ModPagespeedMapProxyDomain http://www.example.com/images/ http://www.example1.com ModPagespeedMapProxyDomain http://www.example.com/js/ http://static.example.com ModPagespeedMapProxyDomain http://www.example.com/css/ http://resources.example.com
The subdirectories are necessary to make sure that mod_pagespeed knows which resources map back to which domains. Read the documentation for more details.
ModPagespeedMapRewriteDomain
is probably not what you want. That directive is basically only used for CDN configuration. It would rewrite URLs from the 3 resource domains towww.example.com
, but would not be able to respond to the request for those rewritten resources (It assumes that the domain you rewrite to is a pull CDN).
For more information, you can read the full PageSpeed Authorizing and Mapping Domains documentation.