Incoming requests from real visitor IPs are logged as 127.0.0.1 when Apache is

Started by Suhitha, Sep 29, 2025, 06:35 AM

Previous topic - Next topic

Suhitha

Question: Incoming requests from real visitor IPs are logged as 127.0.0.1 when Apache is listening on localhost


Applicable to:

  • Plesk for Linux



Symptoms

  • Plesk Obsidian running on a Linux-based operating system
  • Incoming requests from real visitor IPs are logged as 127.0.0.1 in the website access logs when Apache is listening on localhost (after update to 18.0.56)

Cause

This behavior is tied to a known bug that has already been resolved in more recent versions of Plesk Obsidian:

  • #PPPM-14170 "Websites and web applications that analyze client IP addresses now work properly again when Apache is listening to localhost.

Fixed in:

     
  • Plesk Obsidian 18.0.56 Update 2 27 October 2023 (Linux)


Resolution

1. Update your Plesk version to the latest available version by using the steps in this article:
How to update Plesk Obsidian to the latest build?

2. Log into your server via SSH

3. Fix the malfunctioning server configurations after they have been updated to Plesk Obsidian 18.0.56 Update 2 and higher by running the following command:

Warning: Your sites may become inaccessible after executing this command. If that happens, make sure to restart the nginx web server manually

# plesk bin apache --listen-on-localhost true

                    If you cannot or do not want to update Plesk, use this workaround

1. Log into your server via SSH

2. Execute the following command in order to stop Apache from listening on localhost:

Warning: Your sites may become inaccessible after executing this command. If that happens, make sure to restart the nginx web server manually

# plesk bin apache --listen-on-localhost false