Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have this configuration in my Apache virtualhost :

<VirtualHost *:80>

        ProxyPreserveHost On
        ProxyPass /
        ProxyPassReverse /
        ErrorLog /var/log/apache2/blackframes_error.log
        LogLevel warn
        CustomLog /var/log/apache2/blackframes_access.log combined

        ServerSignature Off

But on Play Framework, asking for the client IP (request.remoteAddress) results in a

I'm sure it's because of the proxy, but I don't know which parameter to set to make this works.

Thanks for your help !

share|improve this question
up vote 2 down vote accepted

When using a proxy server, you need to look at the X-Forwarded-For header instead of the remote address (source IP).

share|improve this answer
Exactly! That was the way to look. But I had to add XForwardedSupport= in the application.conf file to make this works. You set me on the right track. Thanks! – Cyril N. Apr 17 '12 at 11:47
Nice to hear that from you! – Khaled Apr 17 '12 at 11:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.