Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to get the configuration of real ip by Apache

Shulou Source: shulou.com Published: 2022-06-01 20:42:14 10月03日 Update

This article mainly introduces Apache how to obtain the real ip configuration, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.

The implementation method of obtaining the configuration of Real ip by Apache

Recently, due to the use of web application firewall products (Aliyun's), the real ip of users can not be obtained.

After various collection attempts, the scheme is as follows:

Apache2.4 provides its own remoteip module to obtain the real ip.

My environment is: ubunt16.04 Apache2.4.18

Cd / etc/apache2.mods-available

New profile

Vim remoteip.conf

Enter:

RemoteIPHeader X-Forwarded-ForRemoteIPProxiesHeader X-Forwarded-By

Save

Enable:

A2enmod remoteip

Restart apache to take effect.

Thank you for reading this article carefully. I hope the article "how to get the real ip configuration of Apache" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and follow the industry information channel. More related knowledge is waiting for you to learn!

Tags: Configuration articles products values interests at the same time documents solutions methods more friends modules environment users knowledge editing industry information information channels firewall Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info NVidia MariaDB Huawei Microsoft