Disco_Dave
08-19-2013, 08:58 AM
Hi Guys
I tried Google's PageSpeed Service it speeded up the forum excellent, but I was having problems with everyones IP's showing up as the same one. Is it possible to do something like this?
PageSpeed Service serves webpages on your behalf to your customers by retrieving original content from your servers. As a result, all requests to your origin server will be from Google's IP addresses. To get the IP address of the user on your origin server, we recommend you use the value stored in the X-Forwarded-For HTTP header. Here are some tips to correctly configure your host and retrieve the X-Forwarded-For header value in common web hosting software:
(Required) Server Software: The following server systems are responsible for managing incoming connections to your origin server.
Apache: Install the mod_remoteip plugin. Please make sure to modify your configuration file (/etc/httpd/conf/httpd.conf) with the updated configuration:
LoadModule remoteip_module /usr/lib64/httpd/modules/mod_remoteip.so
RemoteIPHeader X-Forwarded-For
# Google PageSpeed Service, ref http://support.google.com/a/bin/answer.py?hl=en&answer=60764
RemoteIPInternalProxy 0.0.0.0/0 1.1.1.1/1 2.2.2.2/2
Note: The above IP ranges are placeholders. Please follow the steps listed in this FAQ to find the appropriate list of IP addresses to enter above
Nginx: Install the ngx_http_realip_module plugin.
IIS: Install the Application Request Routing (ARR) module. After installing ARR, please use the HttpContext.Current.Request.Headers["X-Forwarded-For"] variable.
(Recommended) Server Scripting Language: To maintain full functionality of your existing site, we recommend using the following server variables to extract the original client's IP address in your code.
PHP: Use the server variable $_SERVER['HTTP_X_FORWARDED_FOR'].
ASP: Use the variable Request.ServerVariables("HTTP_X_FORWARDED_FOR").
(Recommended) Content Management Systems: If you are also using a content management system, we recommend making the following changes, in addition to the ones above.
Wordpress: Install the Reverse-Proxy Comment IP Fix plugin
phpBB: Turn off Session IP validation checks in the Admin->General->Server Configuration->Security Settings and turn ON the VALIDATE X_FORWARDED_FOR HEADER as described in the phpBB documentation.
Dave
I tried Google's PageSpeed Service it speeded up the forum excellent, but I was having problems with everyones IP's showing up as the same one. Is it possible to do something like this?
PageSpeed Service serves webpages on your behalf to your customers by retrieving original content from your servers. As a result, all requests to your origin server will be from Google's IP addresses. To get the IP address of the user on your origin server, we recommend you use the value stored in the X-Forwarded-For HTTP header. Here are some tips to correctly configure your host and retrieve the X-Forwarded-For header value in common web hosting software:
(Required) Server Software: The following server systems are responsible for managing incoming connections to your origin server.
Apache: Install the mod_remoteip plugin. Please make sure to modify your configuration file (/etc/httpd/conf/httpd.conf) with the updated configuration:
LoadModule remoteip_module /usr/lib64/httpd/modules/mod_remoteip.so
RemoteIPHeader X-Forwarded-For
# Google PageSpeed Service, ref http://support.google.com/a/bin/answer.py?hl=en&answer=60764
RemoteIPInternalProxy 0.0.0.0/0 1.1.1.1/1 2.2.2.2/2
Note: The above IP ranges are placeholders. Please follow the steps listed in this FAQ to find the appropriate list of IP addresses to enter above
Nginx: Install the ngx_http_realip_module plugin.
IIS: Install the Application Request Routing (ARR) module. After installing ARR, please use the HttpContext.Current.Request.Headers["X-Forwarded-For"] variable.
(Recommended) Server Scripting Language: To maintain full functionality of your existing site, we recommend using the following server variables to extract the original client's IP address in your code.
PHP: Use the server variable $_SERVER['HTTP_X_FORWARDED_FOR'].
ASP: Use the variable Request.ServerVariables("HTTP_X_FORWARDED_FOR").
(Recommended) Content Management Systems: If you are also using a content management system, we recommend making the following changes, in addition to the ones above.
Wordpress: Install the Reverse-Proxy Comment IP Fix plugin
phpBB: Turn off Session IP validation checks in the Admin->General->Server Configuration->Security Settings and turn ON the VALIDATE X_FORWARDED_FOR HEADER as described in the phpBB documentation.
Dave