Views: 2033
Last Modified: 10.10.2012
  1. Pass the real IP address from front-end to back-end for proper statistics tracking. SQUID declares the HTTP_X_FORWARDED_FOR variable. To use this value, add the following code to /bitrix/php_interface/dbconn.php:
    if(strlen($_SERVER["HTTP_X_FORWARDED_FOR"])> 0&& $_SERVER["REMOTE_ADDR"]=="")
    if($p = strrpos($_SERVER["HTTP_X_FORWARDED_FOR"], ","))
      $_SERVER["REMOTE_ADDR"] = $REMOTE_ADDR = trim(substr($_SERVER["HTTP_X_FORWARDED_FOR"], $p+1));

    Note! This handler is not required if mod_realip is used. If this is the case, add "RealIP" or other back-end address to the server configuration file (httpd.conf) to have Apache rewrite the address.

  2. Disable KeepAlive in the back-end Apache configuration. Since front-end usually runs at the same machine, faster release of resources will result in the performance gain.

Courses developed by «Bitrix», Inc.