mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 09:25:55 +03:00
[GH-ISSUE #2096] logs internal ip instead of external #1510
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#1510
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @okuzlu on GitHub (Jun 6, 2022).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2096
internal ip address of the nginx-proxy-manager (172.19.x.x) is shown in the access logs of my applications (example bookstack).
how can I get the real ip address instead of the internal?
If I look at the nginx-proxy-manager logs at /logs/proxy-host-x.access.log the external ip is there but not in the container of the application.
i have this running behind cloudflare proxy and set x-forwarded header
@the1ts commented on GitHub (Jun 7, 2022):
This is because NPM is doing the usual for http servers in this situation, i.e. using the ngx_http_real_ip module and setting real_ip for private IP space IPs and CDNs. This swaps in x-forwarded-for header IPs into the log files. Your applications are not doing this so log the address hitting them i.e. outbound IP of the NPM container.
Take a look at /etc/nginx/nginx.conf inside the container for the real_ip section.
@okuzlu commented on GitHub (Jun 9, 2022):
thanks I got it working now. edited nginx.conf in the container