Skip to content

Bash script to restore visitor real IP under Cloudflare with Nginx for aaPanel

License

Notifications You must be signed in to change notification settings

Whitei520/nginx-cloudflare-real-ip-aapanel

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nginx-cloudflare-real-ip-aapanel

Example

Configure Nginx to restore Visitors real IP under Cloudflare CDN

Features

  • Get Cloudflare IPv4 + IPv6 list and create nginx configuration to restore visitors real IP in /www/server/panel/vhost/nginx/cloudflare.conf

Requirements

  • Nginx built with http_realip_module

You can check if http_realip_module available with :

nginx -V 2>&1 | grep with-http_realip_module

If the previous command return nothing, http_realip_module isn't available


Usage

Setup the script to run daily via the cron panel. Example below:

Example

About

Bash script to restore visitor real IP under Cloudflare with Nginx for aaPanel

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • Shell 100.0%