3 messages in ru.sysoev.nginxoriginal filename not getting to 403 ...
FromSent OnAttachments
iane...@public.gmane.orgJan 12, 2007 11:19 pm 
Igor SysoevJan 12, 2007 11:39 pm 
iane...@public.gmane.orgJan 13, 2007 12:00 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:original filename not getting to 403 error pageActions...
From:iane...@public.gmane.org (iane@public.gmane.org)
Date:Jan 12, 2007 11:19:06 pm
List:ru.sysoev.nginx

Hi there...just checking if I have my 403 error call set up incorrectly.

I have my 403 set up with:

error_page 403 /dhe403.shtml;

and the referers checked with:

valid_referers none blocked *.digitalhit.com digitalhit.com *.othersite.com; if ($invalid_referer) { return 403; }

This is inside the location for the static files, which are served directly by nginx.

When the 403 happens the php variable (.shtml is treated as .php by the Apache backend) $_SERVER["REQUEST_URI"] is coming back as "/dhe403.shtml" instead of the image file being requested.

Oddly enough, the 404 error page is getting the $_SERVER["REQUEST_URI"] as the filename being requested, so its working as expected

Any reason why the 403 page's $_SERVER["REQUEST_URI"] is wrong but it's working for the 404? Is the original requested filename not getting passed back to Apache for some reason?

Thanks.