إنجن إكس Nginx حل مشكلة عدم ظهور الاى بى Restoring visitors IP with mod_remoteip
How to enable mod_remoteip - Restoring visitors IP with mod_remoteip
cpanel mod_remoteip - CloudFlare IPs still shown in netstat after mod_remoteip is enabled
https://www.rise.company/forum/image...2021/12/15.png
عند تفعيل inginx هتجد ان الفايروول على مواقع الووردبريس تقرا جميع الايبيهات خطا
اى ان جميع زوار الموقع هيكون الاى بى الخاص بهم هو اى بى السيرفر نفسه وهذا
هيسبب مشكلة كبيرة ! بسبب ان الفايروول هيعمل Block لاى بى السيرفر
وعمل Allow غير صحيح لانه هيظل الفايروول لا يستطيع عمل block لاى هجوم
--------------------------------------------------
1- قم بتثبيت من داخل whm من المسار Home »Software »EasyApache 4
--------------------------------------------------
https://www.rise.company/upload/uplo...7162336791.png
--------------------------------------------------
2- وضع RemoteIPHeader التى تعرف الايبيهات للزوار
--------------------------------------------------
وضع كود Header و IP فى ملف اخر داخل mod_remoteip.conf
كود:
nano /etc/apache2/conf.modules.d/370_mod_remoteip.conf
عند فتح الملف هيكون به سطرين اسفله ضع الكود المطلوب
https://www.rise.company/upload/uplo...8238882481.png
كود:
كود:
RemoteIPHeader X-Forwarded-For
RemoteIPTrustedProxy 140.90.30.111 140.90.30.222
هنا يتم وضع اي بي السيرفر ns1 و ns2 والفاصل بينهم مسافة space
--------------------------------------------------
3- اظهار الاى بى فى ملفات اللوج Log
--------------------------------------------------
هناك نوعين من Log الاول هو combined و الاخر comon اذهب الى المسار
Home » Service Configuration » Apache Configuration » Global Configuration
https://www.rise.company/upload/uplo...7175606251.png
وقم بازالة حرف
h وضع مكانها حرف
a
And modify both of the LogFormat (combined, and common) by replace the "h" with an
"a".
من
كود:
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
الى
كود:
LogFormat "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%a %l %u %t \"%r\" %>s %b" common
ثم قم بعمل ريستارت restart Apache
https://www.rise.company/upload/uplo...8282183231.png
شاهد ايضا
كلاود فلير CloudFlare حل مشكلة Restoring visitors IP with mod_remoteip
ووردبريس WordPress كيفية اظهار الاي بي View my IP address