<div class="gmail_quote">On 28 May 2011 05:54, pk899 <span dir="ltr"><<a href="mailto:nginx-forum@nginx.us">nginx-forum@nginx.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Some problems with your recommendation, Igor.<br>
<br>
1. There is no directive like "gzip_static".<br></blockquote><div> </div><div><a href="http://wiki.nginx.org/NginxHttpGzipStaticModule">http://wiki.nginx.org/NginxHttpGzipStaticModule</a> </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
2. The proxy_pass that you recommend above -- this does a full 301<br>
redirect to Apache! </blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
This is really not the solution I am after.<br>
<br>
So, back to my first question, how do I pass the baton from Apache<br>
(which really needs to be my first front server because of all the<br>
features) only for the static files to nginx?<br></blockquote><div><br></div><div>Then you set up mod_proxy on Apache instead. But with all due respect I think you're after the wrong solution. You're unlikely to gain any performance like that, because you're still making Apache do all the work of talking to clients and holding keepalives. This is where nginx beats the pants of Apache.</div>
<div><br></div><div>Put nginx in front. Test it by starting it on port 81 as suggested previously. When you're happy, switch the ports (nginx on 80, proxying to Apache on <a href="http://127.0.0.1:81">127.0.0.1:81</a>). </div>
<div><br></div><div><br></div><div>Thomas</div><div><br></div></div>