Skip to main content

NGINX Proxy Breaks Apache Logging and Perl $ENV{'REMOTE_ADDR'}

Comments

7 comments

  • tbutler
    I found out that $ENV{'HTTP_X_REAL_IP'} is equivalent to what $ENV{'REMOTE_ADDR'} previously provided. So, my Perl scripts can gain get an accurate IP address (although it seems like it would be cleaner if cPanel configured the Nginx-Apache combo to correct REMOTE_ADDR so scripts do not need to be modified. That still doesn't solve the logging issue, however -- Apache's error_log is almost unusable for debugging if I can't do a grep for a particular IP address when trying to watch it.
    0
  • cPRex Jurassic Moderator
    Hey there! Our docs indicate this should be working properly of mod_remoteip is installed:
    0
  • tbutler
    I'll send in a ticket -- I installed that module, but there aren't an IP addresses written into Apache's error_log still.
    0
  • cPRex Jurassic Moderator
    Weird - when you do that, can you post the ticket number here so I can follow along?
    0
  • tbutler
    Sure -- I'll do it as soon as I can log in. I have my cPanelID password saved to my password manager, but it is rejecting it this morning all the same when I try to log in, so I'm trying to reset it.
    0
  • tbutler
    OK, here's the ticket number: #94313836 . Thank you so much, @cPRex!
    0
  • cPRex Jurassic Moderator
    Thanks! I'm following along with that on my end now so I'll be sure to keep this thread updated once we hear anything.
    0

Please sign in to leave a comment.