-
Notifications
You must be signed in to change notification settings - Fork 499
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
Reverse proxy IP address is 127.0.0.1 #342
Comments
Do you get the correct ip addresses in the nginx/redmine_access.log file? |
Yes, I don't browse redmine from localhost :) nginx's
and the matching entry in redmine's
|
Are your nginx changes to the nginx config inside the container? |
The only nginx I'm changing is on the host, outside the container. |
Ahh okay, I figured that might be whats going on. There is an option to disable the internal nginx server though I'm not sure if it works. #148 Alternatively, if you want to update the internal nginx config so it properly forwards the real ip and create a pull request. https://github.com/sameersbn/docker-redmine/tree/master/assets/runtime/config/nginx |
The IP address in the logs is
127.0.0.1
(as shown using Login Audit plugin) when the docker container is used with nginx in reverse proxy mode. For example inproduction.log
:I use the following nginx
location
configuration which works great with GitLab when using the proper settings ingitlab.rb
, namely:real_ip_trusted_addresses
,real_ip_header
andreal_ip_recursive
but that's a GitLab specific configuration to handle an external reverse proxy.My question is: how to achieve the same as with GitLab but with your redmine docker container? In other words, what config in nginx and redmine shall I use to get the client's real IP in redmine's logs?
I've also tried:
proxy_set_header Client-IP $remote_addr;
and evenCLIENT_IP
as suggested elsewhere, but without success.I believe this nginx config block to be solid, but it seems that redmine needs some magic to start using the right http fields provided by nginx (eg
X-Real-IP
orClient-IP
).The docker instance is created as follows:
Thanks!
The text was updated successfully, but these errors were encountered: