Enable apache remoteip moddule

Server environment

1
2
3
4
5
6
7
8
$ cat /etc/issue
Ubuntu 14.04.5 LTS

$ nginx -v
nginx version: nginx/1.4.6 (Ubuntu)

$ apachectl -v
Server version: Apache/2.4.7 (Ubuntu)

If you have already tried another article from my blog but still not work for you.
Please read this article patiently, maybe it can help you.

Apache2.4 provides its own remoteip module to get client real ip. So you just need to join the configuration and enable this module.

1
$ vim /etc/apache2/mods-enabled/remoteip.load

The add this code at the end

1
2
RemoteIPHeader X-Forwarded-For
RemoteIPProxiesHeader X-Forwarded-By

Save the configuration and restart Apache.

1
$ a2enmod remoteip

Now I think the ip which you need is already been found in you website project!

Thank you for reading.
This post is copyrighted by Liyuliang’s Blog.
If reproduced, please indicate the source: Liyuliang’s Blog
This blog uses Creative Commons Attribution-NonCommercial-Share-Sharing 4.0 International License Agreement to license.


Comments

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×