• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved How to get ip address with apache listening to localhost

TorbHo

Regular Pleskian
Hello,

we used the command
Code:
plesk bin apache --listen-on-localhost true
as described in https://support.plesk.com/hc/en-us/articles/17793065826839

After that we have problems, because some code needs to get the visitor's ip address with PHP
Code:
$_SERVER[ 'REMOTE_ADDR' ]
or with .htaccess
Code:
Allow from xxx.xxx.xxx.xxx

Is there a solution or workaround to get the visitor's ip address when apache is listening to localhost?
 
I tried the solution for
Server-wide solution with Apache only
but I get the error
Code:
/etc/httpd/conf/httpd.conf dir or file not found

If I understand correctly, if I could do that, I had to add:
Code:
RemoteIPHeader CF-Connecting-IP
RemoteIPTrustedProxy 127.0.0.1
into a new file like:
Code:
/etc/httpd/conf.d/localhost.conf
Is that correct?
 
I'm sorry, I posted to the wrong location. This thread belongs to Plesk Obsidian for Linux, not Onyx.
If you are on Debian/Ubuntu it can be /etc/apache2 instead of /etc/httpd.
Yes, it is Ubuntu. Thank you, I will try it.
 
I have blocked ports 7080 and 7081 in the Plesk Firewall. To me, this seems to be a better solution and so far, I haven't encountered any problems with it.

Have I overlooked something? Is there any reason not to block these ports in the firewall?
 
Back
Top