- Joined
- Oct 27, 2019
- Messages
- 151
- Points
- 63
Reputation:
This steps worked for me, doesn´t mean this a 100% trusted Guide, but any other user could have the same problem.
When i installed my xenforo comunity into a VPS from contabo, i found that everyone connected showed on the online page the same IP. Im ussing google adsense and maybe that could be a problem with monetization
Im using Ubuntu 16.04 and VestaCP
You have to do this to fix this problem.
Due im using Nginx and Apache2 i had to follow these steps
Modifications on Apache 2
.Debian/Ubuntu
Clone the following for the most recent build of mod_cloudflare:
. Restart and verify the module is active:
Debian/Ubuntu:
Modifications for Ngixn
Add these IP, in this exactly location etc/nginx/nginx.conf
After this, restart Nginx and Apache2 services
And add this into xenforo config file at the end
When i installed my xenforo comunity into a VPS from contabo, i found that everyone connected showed on the online page the same IP. Im ussing google adsense and maybe that could be a problem with monetization
Im using Ubuntu 16.04 and VestaCP
You have to do this to fix this problem.
Due im using Nginx and Apache2 i had to follow these steps
Modifications on Apache 2
.Debian/Ubuntu
Code:
sudo apt-get install apache2-dev libtool git
Clone the following for the most recent build of mod_cloudflare:
Code:
git clone https://github.com/cloudflare/mod_cloudflare.git; cd mod_cloudflare
. Restart and verify the module is active:
Debian/Ubuntu:
Code:
sudo apachectl restart; apache2ctl -M|grep cloudflare
Modifications for Ngixn
Add these IP, in this exactly location etc/nginx/nginx.conf
Code:
set_real_ip_from 103.21.244.0/22;
set_real_ip_from 103.22.200.0/22;
set_real_ip_from 103.31.4.0/22;
set_real_ip_from 104.16.0.0/12;
set_real_ip_from 108.162.192.0/18;
set_real_ip_from 131.0.72.0/22;
set_real_ip_from 141.101.64.0/18;
set_real_ip_from 162.158.0.0/15;
set_real_ip_from 172.64.0.0/13;
set_real_ip_from 173.245.48.0/20;
set_real_ip_from 188.114.96.0/20;
set_real_ip_from 190.93.240.0/20;
set_real_ip_from 197.234.240.0/22;
set_real_ip_from 198.41.128.0/17;
set_real_ip_from 2400:cb00::/32;
set_real_ip_from 2606:4700::/32;
set_real_ip_from 2803:f800::/32;
set_real_ip_from 2405:b500::/32;
set_real_ip_from 2405:8100::/32;
set_real_ip_from 2c0f:f248::/32;
set_real_ip_from 2a06:98c0::/29;
real_ip_header CF-Connecting-IP;
#real_ip_header X-Forwarded-For;
After this, restart Nginx and Apache2 services
And add this into xenforo config file at the end
Code:
if (isset($_SERVER['HTTP_CF_CONNECTING_IP']))
{ $_SERVER['REMOTE_ADDR']
= $_SERVER['HTTP_CF_CONNECTING_IP'];}
$_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_X_FORWARDED_FOR"];