X-Accel-Redirect testing

w00t nginx-forum at nginx.us
Tue Sep 25 22:28:18 UTC 2012


Hello,
I'd like to test if I set up my configs properly and if they're working.
Should it work if I send a GET request with the X-Accel-Redirect header?
I am using Mozilla plugin "Modify Headers". I have added: "X-Accel-Redirect
/index" and my request on the server is:
(captured with tcpdump)
---
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20100101
Firefox/11.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
X-Accel-Redirect: /index
---
My vhost config in nginx is:
---
server {
        listen   80;
        server_name aa.com;    #it's added in my hosts file
location / {
alias   /var/www;
          internal;
}
}
---

Path is:
---
ls -lh /var/www/
index
---
Error is 404 Not Found - nothing logged in error.log though ...

My environment would actually be Apache as frontend which passes requests
with X-Accel-Redirect to Nginx which serves static files.
But right now I'm in testing phase.

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



More information about the nginx mailing list