View Single Post
  #1  
Old 08-19-2013, 08:58 AM
Disco_Dave's Avatar
Disco_Dave Disco_Dave is offline
 
Join Date: May 2011
Location: Belfast
Posts: 586
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default X-Header http Header

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?

PHP Code:
PageSpeed Service serves webpages on your behalf to your customers by retrieving original content from your servers. As a resultall 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").
(
RecommendedContent Management Systems: If you are also using a content management systemwe recommend making the following changesin addition to the ones above.
WordpressInstall 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
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01163 seconds
  • Memory Usage 1,783KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete