Hi all,<div><br></div><div>I&#39;ve been trying to setup nginx to run as front of Apache on my busy server but things seem not fine to me.</div><div><br></div><div>nginx (0.6.39), Apache (2.2.3) are installed from yum, mod_rpaf (0.6) built from source.</div>
<div><br></div><div>For testing, I&#39;ve set nginx to listen port 81.</div><div><br></div><div>Here&#39;s my configurations:</div><div><br></div><div>nginx:</div><div><div>server {</div><div>  listen 81;</div><div>  server_name <a href="http://mydomain.com">mydomain.com</a> *. <a href="http://mydomain.com">mydomain.com</a>;</div>
<div>  root /home/mywwwroot;</div><div><br></div><div>  location / {</div><div>    proxy_pass <a href="http://127.0.0.1/">http://127.0.0.1/</a>;</div><div>    proxy_redirect default;</div><div>    proxy_set_header Host $host;</div>
<div>    proxy_set_header X-Real-IP $remote_addr;</div><div>    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;</div><div>  }</div><div>  location ~* ^.+.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$ {</div>
<div>    root /home/mywwwroot;</div><div>    access_log off;</div><div>    expires 10d;</div><div>  }</div><div>}</div><div><br></div>mod_rpaf:</div><div><div>LoadModule rpaf_module modules/<a href="http://mod_rpaf-2.0.so">mod_rpaf-2.0.so</a></div>
<div><br></div><div>RPAFenable On</div><div>RPAFsethostname On</div><div>RPAFproxy_ips 127.0.0.1 x.x.168.29</div><div>RPAFheader X-Real-IP</div><div><br></div><div>When I access <a href="http://mydomain.com:81/">http://mydomain.com:81/</a>, it always show the Apache&#39;s default page like I am accessing <a href="http://localhost/">http://localhost/</a>.</div>
<div><br></div><div>Thanks.</div>-- <br>Nguyen Duc Thuan<br><a href="http://www.ndthuan.com/">http://www.ndthuan.com/</a><br><a href="mailto:me@ndthuan.com">me@ndthuan.com</a><br>
</div>