403 forbidden after installation of mod_pagespeed

697 views
Skip to first unread message

Komal Khushal Dubey

unread,
Dec 17, 2016, 8:11:51 AM12/17/16
to pagespeed-insights-discuss
After installation of mod_pagespeed I am facing the problem, css and js files which are rewritten by mod_pagespeed they are causing the 403.
If I remove the rewrite related filters then it works fine.

Joshua Marantz

unread,
Dec 17, 2016, 11:02:19 PM12/17/16
to mod-pagespeed-dev
Hi Komal -- I'm moving this discussion over to mod-pagespeed-discuss.

Usually, if your server is giving 403s after MPS is installed, it is related to mod_rewrite or some other configuration that you have that doesn't expect mod_pagespeed to rewrite URLs.  In some cases (e.g. combining CSS or JS files), a set of files in lower level subdirectories may be moved up, which might not play well with your configuration.  E.g. if you combine
   a/b/x.css
   a/c/y.css
MPS will generate their combined result in URL
   a/b,_x.css+c,_y.css.pagespeed.cc.HASH.css

If you have Apache directives that forbid loading out of a/ but allow loading out of subdirectories of a/ that would then be consistent with your observation.

One possible remedy is to start off using mod_pagespeed in a manner where it makes resources smaller but doesn't change URLs.  Check out https://developers.google.com/speed/pagespeed/module/optimize-for-bandwidth

Another remedy is to make sure you don't have other Apache directives that would disallow the URL patterns PageSpeed generates.

-Josh



On Sat, Dec 17, 2016 at 8:11 AM, Komal Khushal Dubey <komalk...@helixtechsolutions.com> wrote:
After installation of mod_pagespeed I am facing the problem, css and js files which are rewritten by mod_pagespeed they are causing the 403.
If I remove the rewrite related filters then it works fine.

--
You received this message because you are subscribed to the Google Groups "pagespeed-insights-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pagespeed-insights-discuss+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pagespeed-insights-discuss/24c32259-8b33-44fe-b342-72cfefa91acd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

José Luis Nieto

unread,
Jun 8, 2017, 1:05:22 AM6/8/17
to pagespeed-insights-discuss
If you are using apache it's posible that pagespeed mod is rewritten URL segments greatest than 250 characters and apache server has a further limitation of about 250.

Jose
Reply all
Reply to author
Forward
0 new messages