Problem with proxy

outplayed

Moderator
Moderator
Collaborate
Registered
Joined
Oct 27, 2019
Messages
151
Points
63

Reputation:

Does anyone know why every member in my web is using the same IP, im using a VPS from contabo service
Capture.PNG
 

boo

Well-known member
Registered
Joined
Aug 29, 2019
Messages
54
Points
28

Reputation:

If for some reason your using proxy_pass you need to add below:

Code:
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
 

outplayed

Moderator
Moderator
Collaborate
Registered
Joined
Oct 27, 2019
Messages
151
Points
63

Reputation:

Im running on Ubuntu and ussing apache
 

boo

Well-known member
Registered
Joined
Aug 29, 2019
Messages
54
Points
28

Reputation:

So your getting the server ip for all users, using apache?

No idea how you have managed that.
 

thomsa

Moderator
Staff member
Moderator
S.V.I.P Member
Collaborate
Registered
Joined
Jun 22, 2019
Messages
1,066
Points
173

Reputation:

what your cp ?
 

boo

Well-known member
Registered
Joined
Aug 29, 2019
Messages
54
Points
28

Reputation:

My advice would be not to use a panel, they cause more problems than good.
 

fmsc88

Collaborate
Collaborate
Registered
Joined
May 22, 2019
Messages
104
Points
53

Reputation:

@outplayed i had same issue,
go to src/config.php and add this if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) { $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; }

then restart apache and mysql
 

boo

Well-known member
Registered
Joined
Aug 29, 2019
Messages
54
Points
28

Reputation:

That's for cloudlare? He isn't getting cloudflare IP it's showing server IP.
 

fmsc88

Collaborate
Collaborate
Registered
Joined
May 22, 2019
Messages
104
Points
53

Reputation:

I know it's showing server IP, that was happening to me. and used the above code to fix it
 

boo

Well-known member
Registered
Joined
Aug 29, 2019
Messages
54
Points
28

Reputation:

I still think it's to do with proxypass. I would normally say look in apache 000-default.conf, but your using a panel and I'm sure your files will be modified to death.
 
Last edited:

sucre13

Moderator
Staff member
Moderator
Collaborate
Registered
Joined
Jan 19, 2019
Messages
836
Points
153

Reputation:

a lot of times that proxy can be google robots don't take that away
 

outplayed

Moderator
Moderator
Collaborate
Registered
Joined
Oct 27, 2019
Messages
151
Points
63

Reputation:

thats not the thing, thats the IP from my VSP
 
Top