Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

r1736 - Intermittent 403 for optimized subresources #482

Closed
GoogleCodeExporter opened this issue Apr 6, 2015 · 9 comments
Closed

r1736 - Intermittent 403 for optimized subresources #482

GoogleCodeExporter opened this issue Apr 6, 2015 · 9 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Vhost, single server configuration as a reverse proxy for HTML and 
forward-proxy for the fetcher
2. Core Filters
3. After optimizations, sub resources result in a 403 intermittently.  No logic 
to what results in a 403 and what results in a 200.  You need a page full of 
resources to see the problem.

You can take any webpage in a single server environment.

The error log displays the following(disregard the localhost VIP, I tested the 
fetcher grabbing directly from the origin):
[Sat Jul 28 05:02:39 2012] [error] [client 127.0.0.1] client denied by server 
configuration: uri /images/ajax-loader.gif.pagespeed.ce.vhzt6XKJwT.gif, 
referer: http://www.foo.com/
[Sat Jul 28 05:02:39 2012] [debug] net/instaweb/apache/mod_instaweb.cc(377): 
[client 127.0.0.1] ModPagespeed OutputFilter called for request 
/images/ajax-loader.gif.pagespeed.ce.vhzt6XKJwT.gif, referer: 
http://www.foo.com/
[Sat Jul 28 05:02:39 2012] [debug] net/instaweb/apache/mod_instaweb.cc(398): 
[client 127.0.0.1] Request not rewritten because: request->status != 200 (was 
403), referer: http://www.foo.com/

More data:
The fetcher never actually tries to make a fetch.  I've traced the requests and 
the fetcher needs make a successful request for the subresource which leads me 
to believe that there might be a configuration problem or bug.

What version of the product are you using (please check X-Mod-Pagespeed
header)?
r1736 - I've seen this in the last few revisions.

On what operating system?
Ubuntu 10.04

Which version of Apache?
Apache 2.2.22

Which MPM?
Event

URL of broken page:
/etc/hosts 
72.21.94.143    petfood.edgeoptimizer.com

Original issue reported on code.google.com by hayes...@gmail.com on 28 Jul 2012 at 5:25

@GoogleCodeExporter
Copy link
Author

"client denied by server configuration" comes from mod_authz_host --- that's 
the thing that handles things like 'allow from localhost'.  I suspect we don't 
even get to handle_as_resource (in instaweb_handler.cc), which is the part of 
our code that should handle it; if we did, you should probably see debug logs 
like:
"Fetching resource /images/ajax-loader.gif.pagespeed.ce.vhzt6XKJwT.gif", 
followed by something like "Fetch failed for " or "Fetched timed out for"
unless we failed to recognize the request as ours.

Why it would be intermittent is weird, though; that module should at least 
behave consistently per url, unless it does something really weird (env, 
perhaps?)

Original comment by morlov...@google.com on 30 Jul 2012 at 2:21

@GoogleCodeExporter
Copy link
Author

Okay, we tried some configurations added this bit into the vhost conf and that 
seems to fix the problem.  It is odd that we were experiencing intermittent 
issues with this however.

   <Location "/">                                                                                 
      Include /trustedIPs.conf
   </Location>

We'll this a bit more testing and report back.

Original comment by hayes...@gmail.com on 30 Jul 2012 at 6:24

@GoogleCodeExporter
Copy link
Author

Let us know if you want us to do something on this, Hayes.

Original comment by jmara...@google.com on 15 Aug 2012 at 12:50

  • Changed state: RequestClarification

@GoogleCodeExporter
Copy link
Author

Original comment by matterb...@google.com on 20 Aug 2012 at 3:37

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

Original comment by sligocki@google.com on 10 Sep 2012 at 8:55

@GoogleCodeExporter
Copy link
Author

I'm also seeing this issue, though it isn't intermittent. Any request to 
pagespeed optimized resources results in a 403 error, unless apache has been 
set to allow requests by default starting with the root directory as shown 
below. The issue doesn't seem to occur in v1870. 

<Directory />
 #Order Deny,Allow
 #Deny from all
  Order allow,deny
  Allow from all
</Directory>

Original comment by dan...@djmillers.com on 20 Sep 2012 at 1:37

@GoogleCodeExporter
Copy link
Author

Daniel, we are investigating various 403 issues in more detail at the moment.

Can you provide details of your setup please? What servers are you running, 
what's in your httpd.conf and pagespeed.conf, and anything else you think 
relevant.

Thanks!

Original comment by matterb...@google.com on 11 Dec 2012 at 3:26

  • Changed state: RequestClarification

@GoogleCodeExporter
Copy link
Author

daniel@ please try the latest release (1.2.24.1) to see if it fixes your 
problem.
If not, please try building from source 
(https://developers.google.com/speed/docs/mod_pagespeed/build_from_source).

There have been a number of recent fixes addressing 403 errors.

Original comment by matterb...@google.com on 30 Jan 2013 at 4:31

@GoogleCodeExporter
Copy link
Author

Marking as Closed: the OP has a fix/work-around and Daniel hasn't provided 
further details.

Original comment by matterb...@google.com on 26 Jun 2013 at 2:52

  • Changed state: Closed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant