Setting up nginx as reverse proxy to Apache, what's wrong?

Thuan Nguyen me at
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:

server {
  listen 81;
  server_name *.;
  root /home/mywwwroot;

  location / {
    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 ~*
    root /home/mywwwroot;
    access_log off;
    expires 10d;

LoadModule rpaf_module modules/

RPAFenable On
RPAFsethostname On
RPAFproxy_ips x.x.168.29
RPAFheader X-Real-IP

When I access, it always show the Apache's default
page like I am accessing http://localhost/.

Nguyen Duc Thuan
me at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list