Issue with rewrite rule, need help

Hi Folks,

I am having apache server which is being prtoected by nginx reverse
proxy
server. Now issue I am facing here is while accessing certain page proxy
is
throwing me error 301 and instead of opening up pdf file in a separate
window it shows 301 error and brings up a login screen.

Here are the logs with reverse proxy.

xx.xxx.xxx.xx - - [25/Apr/2015:15:54:04 +0530] “GET
/Axxxx/cgi-bin/distributor_xxxx/printreceipt.pl?action=viewreceipt&sessionid=142995736904385&receiptno=R/201504/MH55/0010&print_receipt=Yes&reprint_rec=REPRINT
HTTP/1.1” 200 523 “-” “Mozilla/4.0 (compatible; MSIE 7.0; Windows NT
6.1;
WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET
CLR
3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; MS-RTC LM 8)”

xx.xxx.xxx.xx - - [25/Apr/2015:15:54:06 +0530] “GET
/xxxxxxx/distributor_xxxxx/receipt_pdf/xxxxxx_201504_MH55_xxxx.pdf
HTTP/1.1”
301 178 “-” “Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64;
Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR
3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; MS-RTC LM 8)”

And strangely when I connect to the server directly the page opens up
properly, here are the logs of when I connect to the server directly.

192.168.20.160 - - [25/Apr/2015:16:13:32 +0530] “GET
/xxxxxx/cgi-bin/distributor_xxxxx/printreceipt.pl?action=viewreceipt&sessionid=142995852208801&receiptno=R/201504/MH55/0010&print_receipt=Yes&reprint_rec=REPRINT
HTTP/1.1” 200 511

192.168.20.160 - - [25/Apr/2015:16:13:36 +0530] “GET
/xxxxxx/distributor_xxxxxx/receipt_pdf/MH55R_201504_MH55_0010.pdf
HTTP/1.1”
200 29270

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,258370,258370#msg-258370

On Sat, Apr 25, 2015 at 08:25:20AM -0400, blason wrote:

Hi there,

What does your configuration tell nginx to do with the request for
/xxxxxxx/distributor_xxxxx/receipt_pdf/xxxxxx_201504_MH55_xxxx.pdf

You haven’t shown the rewrite rule mentioned in your Subject: line.

f

Francis D. [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs