-
Notifications
You must be signed in to change notification settings - Fork 1.1k
enable mod_remoteip and add config for X-Forwarded-For IP address #411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Can anyone review the PR and raise your concern? |
looks good to me |
@gingerlime Can you merge the PR? Thanks |
I'm not a member / have no merge rights here unfortunately. |
@tianon Can you please help with the merge of this PR? Thanks |
I tried to manually apply this PR and it doesn't work for me when using jwilder-nginx-proxy in front of wordpress. I tried this is the Dockerfile I used to test:
I have built it doing
but when I access http://localhost the logs entries I see in the wordpress containers is not the client ip but the reverse proxy ip in the docker network. I had to modify the apache vhos config as described here and this works #383 (comment) |
Yes, unfortunately it doesn't work out of the box. I also modified the
and my docker-compose.yml file has an entry to mount this file volumes:
- /etc/hosting-compose/000-default.conf:/etc/apache2/sites-enabled/000-default.conf |
…ation so it works out-of-the-box
Changes: - docker-library/wordpress@f614686: Merge pull request docker-library/wordpress#411 from haozhou/master - docker-library/wordpress@a4eef48: Adjust for templating, add more comments, adjust default log configuration so it works out-of-the-box - docker-library/wordpress@fb61310: Enable mod_remoteip and add config for X-Forwarded-For IP address
It helps to retrieve real client IP forward by the load balancer (or reverse proxy like haproxy or nginx)
It's the recommended way to retrieve client ip from "X-Forwarded-For" header in apache 2.4
Closes #383