This is an old revision of the document!


LSCache supports GEOIP. To enable it, the following steps need to be followed.

1. Enable Geolocation database

From LSWS Web Console: General →General settings:→ Enable IP GeoLocation → Yes

2. Install GeoIP database For CentOS user:

yum install Geoip-data

Also check the installation location

rpm -ql Geoip-data

3. Install other modules:

yum install GeoIP GeoIP-devel zlib-devel

4. Enable GeoIP on Apache Conf Config by placing the the following directive as the same way as apache.

 GeoIPEnable On

5. User rewrite rule to control the redirect:

For example, add the following rewrite rules to your “.htaccess” file:

<IfModule LiteSpeed>
  RewriteEngine on
  RewriteRule .* - [E=Cache-Control:vary=%{ENV:GEO_COUNTRY}]
</IfModule>

You can add rewrite condition for more specific rules, such as UK, EU and US + rest of the world show different contents, or show different currencies.

  • Admin
  • Last modified: 2016/02/25 17:22
  • by Jackson Zhang