• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.4 Undefined index: HTTP_X_REAL_IP

clove28

Active member
#1
I received this server error. What does this mean?

Code:
ErrorException: Undefined index: HTTP_X_REAL_IP - library/config.php:36

Generated By: Unknown Account, Today at 4:05 PM

Stack Trace

#0 /pefcommunity.com/public/library/config.php(36): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/nginx/dom...', 36, Array)

#1 /pefcommunity.com/public/library/XenForo/Application.php(616): require('/home/nginx/dom...')

#2 /pefcommunity.com/public/library/XenForo/Application.php(265): XenForo_Application->loadConfig()

#3 /pefcommunity.com/public/library/XenForo/Install/Controller/Abstract.php(10): XenForo_Application->loadDefaultData()

#4 /pefcommunity.com/public/library/XenForo/Controller.php(304): XenForo_Install_Controller_Abstract->_preDispatchFirst('Login')

#5 /pefcommunity.com/public/library/XenForo/FrontController.php(346): XenForo_Controller->preDispatch('Login', 'XenForo_Install...')

#6 /pefcommunity.com/public/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))

#7 /pefcommunity.com/public/install/index.php(18): XenForo_FrontController->run()

#8 {main}
 

MattW

Well-known member
#4
This is what he's set (along with the Cloudflare stuff)
PHP:
// FIX IP ADDRESS FOR PROXY
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_REAL_IP'];
 

MattW

Well-known member
#5
Although, nginx is already configured for Cloudflare
Code:
#CloudFlare
set_real_ip_from 199.27.128.0/21;
set_real_ip_from 173.245.48.0/20;
set_real_ip_from 103.21.244.0/22;
set_real_ip_from 103.22.200.0/22;
set_real_ip_from 103.31.4.0/22;
set_real_ip_from 141.101.64.0/18;
set_real_ip_from 108.162.192.0/18;
set_real_ip_from 190.93.240.0/20;
set_real_ip_from 188.114.96.0/20;
set_real_ip_from 197.234.240.0/22;
set_real_ip_from 198.41.128.0/17;
set_real_ip_from 162.158.0.0/15;
set_real_ip_from 104.16.0.0/12;
set_real_ip_from 172.64.0.0/13;
real_ip_header CF-Connecting-IP;