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 [2019/01/08 19:39]
Lisa Clarke [Please clarify what do you mean ''GeoIP not working'']
litespeed_wiki:cache:common:geoip-support [2019/03/25 19:44]
Jackson Zhang
Line 26: Line 26:
   /​usr/​share/​GeoIP/​GeoLite2-Country.mmdb   /​usr/​share/​GeoIP/​GeoLite2-Country.mmdb
   ​   ​
-=== Setup database file path === +=== Setup database file path "DB File Path" and database "DB Name"=== 
-In LSWS WebAdmin, configure the database location. ​ Navigate to **Configuration > Server > General > General settings** and set  **[[https://​www.litespeedtech.com/​docs/​webserver/​config/​general#​geolocationDB|IP to GeoLocation DB]]** to the database path. +In LSWS WebAdmin, configure the database location ​and name(Both "DB File Path" and "DB Name" are mandotory and can not be empty).  Navigate to **Configuration > Server > General > General settings** and set  **[[https://​www.litespeedtech.com/​docs/​webserver/​config/​general#​geolocationDB|IP to GeoLocation DB]]** to the database path, then set "DB Name""​Environment Variables"​ and "​Notes"​ are optional. 
 + 
 +{{ :​litespeed_wiki:​cache:​common:​litespeed-enable-geoip2-1.png?​800 |}} 
 +{{ :​litespeed_wiki:​cache:​common:​litespeed-enable-geoip2-2.png?​800 |}}
  
 Alternatively,​ you can edit the LSWS configuration file directly: ​ Alternatively,​ you can edit the LSWS configuration file directly: ​
Line 37: Line 40:
     <​geoipDB>​     <​geoipDB>​
       <​geoipDBFile>/​usr/​share/​GeoIP/​GeoLite2-Country.mmdb</​geoipDBFile>​       <​geoipDBFile>/​usr/​share/​GeoIP/​GeoLite2-Country.mmdb</​geoipDBFile>​
 +      <​geoipDBName>​GeoLite2-Country.mmdb</​geoipDBName>​
     </​geoipDB>​     </​geoipDB>​
  </​ipToGeo>​  </​ipToGeo>​
Line 164: Line 168:
 </​code>​ </​code>​
   ​   ​
-If it returns ​404, then it means the GeoIP module is actually working. ​+If it returns ​''​403 forbidden''​, then it means the GeoIP module is actually working. ​
   ​   ​
 GeoIP rewrite rules that do not work as expected may be more complicated. You will need to check the rules to look for issues such as a redirect loop. When needed, you can log a ticket with us. Let us know the rules set is not working as expected, and provide a more detailed test example for us to take a further look.  GeoIP rewrite rules that do not work as expected may be more complicated. You will need to check the rules to look for issues such as a redirect loop. When needed, you can log a ticket with us. Let us know the rules set is not working as expected, and provide a more detailed test example for us to take a further look. 
  • Admin
  • Last modified: 2020/11/14 15:24
  • by Lisa Clarke