"X-Accel-Redirect" and Wordpress MU solution
Igor Sysoev
igor at sysoev.ru
Fri Nov 27 11:42:11 MSK 2009
On Fri, Nov 27, 2009 at 03:26:00AM -0500, rahul286 wrote:
> I am trying to get "X-Accel-Redirect" working on my ngnix and Wordpress MU server.
>
> I came across this official wordpress thread - http://trac.mu.wordpress.org/changeset/1946
>
> I followed it. I added codes in blogs.php. I also defined 'WPMU_ACCEL_REDIRECT' as 'true'.
>
> After that I ended in 500 errors. :-(
>
> Then I found this article written in chinese - http://bit.ly/74uWtM
> (english translation - http://bit.ly/89ei5Z)
>
> I also found reason of 500 error to be "redirect loop".
> I followed that chinese bloggers advise and code but ended up in 404 errors.
>
> I think I need to have something correct in ngnix conf files but I failed to figure it out.
> I could not come out of series of 404 and 500 errors.
>
> Can anyone got "X-Accel-Redirect" working with Wordpress MU successfully?
In this configuration:
location /uri1/ {
fastcgi_pass wordpress;
}
location /uri2/ {
internal;
root /path/to/files;
}
a public URL is /uri1/some_file, WordPress should return
"X-Accel-Redirect: /uri2/some_file",
then nginx will send "/path/to/files/uri2/some_file".
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list