Home > Topics > Pagoda Panel > How to make the Pagoda panel log display the user's real IP after using CDN?

How to make the Pagoda panel log display the user's real IP after using CDN?

藏色散人
Release: 2019-10-21 11:38:30
forward
3783 people have browsed it

How to make the Pagoda panel log display the user's real IP after using CDN?

As we all know, after a site uses CDN, neither the commenter IP nor the user IP displayed in the log is the user's real IP, but the CDN node IP or transit IP, etc. Today I will focus on telling you how to make the logs of Pagoda Panel show the real IP for sites using CDN.

How to make the Pagoda panel log display the users real IP after using CDN?

##Log in to the Pagoda Panel Backend>> Software Store>> Running Environment>> Click the corresponding "Settings" on the right side of nginx>> In nginx In the management, click "Configuration Modification" on the left side>> Add the following two lines of code after http{, as shown below:

set_real_ip_from 0.0.0.0/0;
real_ip_header X-Forwarded-For;
Copy after login

How to make the Pagoda panel log display the users real IP after using CDN?

Save and then restart nginx That’s it. Remember, be sure to back up before operating! !

After completing this, return to the Pagoda log and you will see that the log no longer displays the CDN’s node IP or transit IP, but the user’s real IP.

The above is the detailed content of How to make the Pagoda panel log display the user's real IP after using CDN?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:boke112.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template