We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
Reverse Proxy and IPs: Remove or modify?
Reverse Proxy and IPs: Remove or modify?
Hello. I've been working on my server lately and I've noticed that all visitors are under the same IP address, the server's IP. I looked up what was the problem, and I've seen that it's nginx being used as a reverse proxy.
The cons of removing this I've seen is slower load times for your websites, but I really want to ask, what would be the better route?
I've heard of installing libapache2-mod-rpaf, but to my surprise I found it already installed. I am definitely not seeing the visitors' IPs being forwarded to the forum script i'm using. I need to know the IPs of the visitors in case of the need to IP ban someone or stop spam by blocking a range of addresses.
If it is better to uninstall nginx in this circumstance, can someone help me with the steps to do that without damaging my installation of VestaCP?
And if not, can someone tell me how to configure the nginx server to forward visitors' IP addresses to the forum software i'm using?
Or is there a third option I do not know about here? Am I wrong about any of the information I've gathered?
Thanks for the help!
The cons of removing this I've seen is slower load times for your websites, but I really want to ask, what would be the better route?
I've heard of installing libapache2-mod-rpaf, but to my surprise I found it already installed. I am definitely not seeing the visitors' IPs being forwarded to the forum script i'm using. I need to know the IPs of the visitors in case of the need to IP ban someone or stop spam by blocking a range of addresses.
If it is better to uninstall nginx in this circumstance, can someone help me with the steps to do that without damaging my installation of VestaCP?
And if not, can someone tell me how to configure the nginx server to forward visitors' IP addresses to the forum software i'm using?
Or is there a third option I do not know about here? Am I wrong about any of the information I've gathered?
Thanks for the help!
Re: Reverse Proxy and IPs: Remove or modify?
OS? Version?
Re: Reverse Proxy and IPs: Remove or modify?
I had the same issue on Ubuntu and I followed this post to fix it: viewtopic.php?f=10&t=6650#p20197
Re: Reverse Proxy and IPs: Remove or modify?
In theory there is two ways:
- reactivate mod rpaf and check rpaf config
- use something else like remoteip
rpaf old and can be a problem in future with apache 2.4,
but in many debian/ubunbu still in apache repo... sad but true
- reactivate mod rpaf and check rpaf config
- use something else like remoteip
rpaf old and can be a problem in future with apache 2.4,
but in many debian/ubunbu still in apache repo... sad but true
Re: Reverse Proxy and IPs: Remove or modify?
I'm running Ubuntu 15.04 on my web server. I just tried removing mod-rpaf and enabling remoteip.
I set my remoteip.conf as this:
(I actually used the public IP of the webserver, I didn't just put the x's there.)
And when i restarted apache I got this error, all my websites gave me 500 internal server error.
I removed that line with the public IP, and my websites were able to be viewed again, but still no IP passthrough.
Help?
I set my remoteip.conf as this:
Code: Select all
<IfModule mod_remoteip.c>
RemoteIPHeader X-Real-IP
RemoteIPInternalProxy 127.0.0.1
RemoteIPInternalProxy xxx.xxx.xxx.xxx // Public IP
</IfModule>
And when i restarted apache I got this error, all my websites gave me 500 internal server error.
Code: Select all
* Restarting web server apache2 [fail]
* The apache2 configtest failed.
Output of config test was:
AH00526: Syntax error on line 4 of /etc/apache2/mods-enabled/remoteip.conf:
RemoteIP: Error parsing IP // (The specified IP address is invalid. error) for RemoteIPInternalProxy
Action 'configtest' failed.
Help?
Re: Reverse Proxy and IPs: Remove or modify?
Code: Select all
RemoteIPInternalProxy 127.0.0.1 xxx.xxx.xxx.xxx
Re: Reverse Proxy and IPs: Remove or modify?
That worked! You really saved me there. Thank you!
Re: Reverse Proxy and IPs: Remove or modify?
Nice ;-)
Have a nice day.
Have a nice day.