Setting up nginx as reverse proxy to Apache, what's wrong?
Thuan Nguyen
me at ndthuan.com
Fri Jan 29 03:23:38 MSK 2010
Hi all,
I've been trying to setup nginx to run as front of Apache on my busy server
but things seem not fine to me.
nginx (0.6.39), Apache (2.2.3) are installed from yum, mod_rpaf (0.6) built
from source.
For testing, I've set nginx to listen port 81.
Here's my configurations:
nginx:
server {
listen 81;
server_name mydomain.com *. mydomain.com;
root /home/mywwwroot;
location / {
proxy_pass http://127.0.0.1/;
proxy_redirect default;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
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)$
{
root /home/mywwwroot;
access_log off;
expires 10d;
}
}
mod_rpaf:
LoadModule rpaf_module modules/mod_rpaf-2.0.so
RPAFenable On
RPAFsethostname On
RPAFproxy_ips 127.0.0.1 x.x.168.29
RPAFheader X-Real-IP
When I access http://mydomain.com:81/, it always show the Apache's default
page like I am accessing http://localhost/.
Thanks.
--
Nguyen Duc Thuan
http://www.ndthuan.com/
me at ndthuan.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20100129/a259f524/attachment.html>
More information about the nginx
mailing list