0

The proxy works fine, my distro is Ubuntu 10.04LTS (Server) and rpaf is loaded within apache, with the following settings httpd.conf:

<IfModule mod_rpaf.c>
  RPAFenable On
  RPAFsethostname On
  RPAFproxy_ips 127.0.0.1
</IfModule>

I can be sure it is loaded, for example:

#a2enmod rpaf
Module rpaf already enabled

I had force-reloaded apache, and reloaded nginx but all my connections are still from 127.0.0.1:

127.0.0.1 - - [13/Dec/2010:23:56:27 -0800] "GET /index.php HTTP/1.0" 200 1267 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.19) Gecko/2010031422 Firefox/3.0.19"

Why is it still localhost from external? I'll give any info if needed.

2 Answers 2

1

Doublecheck the requests from the proxy contain the x-forwarded-for header, usually that's the problem.

2
  • How do I check this? I think I can, but am unsure how to check between the two..
    – John R.
    Dec 14, 2010 at 8:30
  • Ah, nevermind, looked at other configs and was missing the forward option completely. Will answer myself -- see other answer for details. Thank you.
    – John R.
    Dec 14, 2010 at 8:34
1

Found the problem, in /etc/nginx/sites-available/default I forgot to add the add header lines, my config now looks like so:

location / {
        proxy_pass http://127.0.0.1:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

And voila!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .