Reverse proxy and html rewrite

valor nginx-forum at
Fri Oct 8 15:56:49 MSD 2010


As far as I know body content rewriting it's not possible with nginx, I
may be wrong, i'm a newbie with nginx.
What nginx supports is URL rewriting through HttpRewrite module and this
has nothing to do with returned body content rewriting. 

URL Rewriting works when nginx receives a requests, it parses the URL
requested and rewrite as appropiate according to your rules. At this
point the call have not been made to the real request. It doesn't matter
where the real call (after rewriting is done) is then sent, be it
reverse proxy, static, fcgi daemon, whatever you want. 

What do you want is to rewrite the content that the backends returns,
that's not something you can do with the HttpRewrite module. 

What indeed you can do to solve your problem is to setup nginx to accept
ssl connections for that site, let the login form send users to ssl and
inside ssl server config in nginx place a 301 redirect to your http



Posted at Nginx Forum:,138048,138451#msg-138451

More information about the nginx mailing list