Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
litespeed_wiki:cache:common:geoip-support [2020/01/28 21:26]
Lisa Clarke [Map IP2Location Variables to Maxmind GeoIP2] Further clarification
litespeed_wiki:cache:common:geoip-support [2020/01/29 21:28]
Lisa Clarke Corrected Brand Capitalization
Line 1: Line 1:
-====== GeoLocation ​support ​(GEOIP) for LiteSpeed Web Server ​ ======+====== GeoLocation ​Support ​(GeoIP) for LiteSpeed Web Server ​ ======
  
 LSCache supports GEOIP databases, including MaxMind GeoIP2, MaxMind GeoIP Legacy, and IP2Location. ​ MaxMind discontinued their Legacy databases On January 2, 2019, hence we recommend you no longer use it. LSCache supports GEOIP databases, including MaxMind GeoIP2, MaxMind GeoIP Legacy, and IP2Location. ​ MaxMind discontinued their Legacy databases On January 2, 2019, hence we recommend you no longer use it.
Line 10: Line 10:
 To setup and enable GeoIP on LSWS, you will need to choose one database, download and install the database to a directory, setup the database path in LSWS Admin, enable GeoIP through the Apache configuration or LSWS native, then finally run some tests. ​ To setup and enable GeoIP on LSWS, you will need to choose one database, download and install the database to a directory, setup the database path in LSWS Admin, enable GeoIP through the Apache configuration or LSWS native, then finally run some tests. ​
  
-===== Map IP2Location ​Variables to Maxmind GeoIP2 ​===== +===== Map MaxMind GeoIP2 ​Variables to IP2Location ​===== 
-If you have switched from the Maxmind ​GeoIP2 service to an IP2location database on your shared hosting server, many of your PHP scripts may still make use of the ''​GEOIP_*''​ environment variables ''​$SERVER['​GEOIP_COUTRY_CODE'​]''​ and ''​$SERVER['​GEOIP_ADDR'​]''​. Because of the nature of shared hosting servers, it is impossible to remove these environment variables or get all customers to rename them in their scripts. ​+If you have switched from the MaxMind ​GeoIP2 service to an IP2location database on your shared hosting server, many of your PHP scripts may still make use of the ''​GEOIP_*''​ environment variables ''​$SERVER['​GEOIP_COUTRY_CODE'​]''​ and ''​$SERVER['​GEOIP_ADDR'​]''​. Because of the nature of shared hosting servers, it is impossible to remove these environment variables or get all customers to rename them in their scripts. ​
  
 Luckily, LiteSpeed Web Server handles this scenario for you. Luckily, LiteSpeed Web Server handles this scenario for you.
Line 53: Line 53:
   </​code>​   </​code>​
  
-==== Advanced Configuration:​GEOIP2 ​Environment Variables ====+==== Advanced Configuration:​GeoIP2 ​Environment Variables ====
  
 The full power of GeoIP2 requires the use of environment variables in the LiteSpeed configuration. The format used is designed to be as similar as possible to the Apache ''​mod_maxminddb''​ environment described [[https://​github.com/​maxmind/​mod_maxminddb|here]] ,​specifically for the ''​MaxMindDBEnv''​ variable. ​ Each environment variable is specified in the environment text box as one line: The full power of GeoIP2 requires the use of environment variables in the LiteSpeed configuration. The format used is designed to be as similar as possible to the Apache ''​mod_maxminddb''​ environment described [[https://​github.com/​maxmind/​mod_maxminddb|here]] ,​specifically for the ''​MaxMindDBEnv''​ variable. ​ Each environment variable is specified in the environment text box as one line:
  • Admin
  • Last modified: 2020/11/14 15:24
  • by Lisa Clarke