Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

X-Forwarded-For question

26 views
Skip to first unread message

gi...@shaw.ca

unread,
Feb 6, 2025, 3:57:57 PMFeb 6
to islandora
My Apache2 sits behind a proxy and I want to see the original IPs accessing my Islandora.

I have enabled the remoteip and headers mods (with apache restart)

Depending on what I configure I see either no log creation or the proxy IP (but not the source IP)

My apache conf has this for logs:

LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

I have tried substituting %h for %a but no joy...also tried adding the proxy IP in a separate .conf file or within the apache2.conf file.

Would anybody have any suggestions on what I may be missing ?

Thanks

Tom Misilo

unread,
Feb 6, 2025, 6:02:48 PMFeb 6
to isla...@googlegroups.com
Have you set the following option as well?

RemoteIPHeader X-Forwarded-For

--
Learn more about Islandora in general at islandora.ca and join the community at https://github.com/Islandora/islandora-community/wiki
---
You received this message because you are subscribed to the Google Groups "islandora" group.
To unsubscribe from this group and stop receiving emails from it, send an email to islandora+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/islandora/7a08042d-2ad6-4a52-8e2d-eedc0ad37d54n%40googlegroups.com.

gi...@shaw.ca

unread,
Feb 7, 2025, 1:18:11 PMFeb 7
to islandora
I did it in the apache.conf file.
I just discovered an article that says it should go into the the site specific  .conf file. Does that make sense ?

Jared Whiklo

unread,
Feb 7, 2025, 4:40:03 PMFeb 7
to isla...@googlegroups.com

Assuming that Nginx is properly passing the IP in the X-Forwarded-For header, then something like

%{X-FORWARDED-FOR}i 

in your apache LogFormat should work. I use that in our apache behind the campus firewall and get the original IP.

cheers,
jared

gi...@shaw.ca

unread,
Feb 10, 2025, 1:53:15 PMFeb 10
to islandora
Got it going by following this site:
I can see the original IPs but the base DG log files are no longer being created. Which is OK for now.
Thanks
Reply all
Reply to author
Forward
0 new messages