Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
litespeed_wiki:lisa-temp [2018/07/18 14:21] Lisa Clarke [Step 2. Setup] |
litespeed_wiki:lisa-temp [2018/07/18 14:22] Lisa Clarke [Step 4. Check Correct IP is Set] |
||
---|---|---|---|
Line 18: | Line 18: | ||
/usr/local/share/GeoIP/GeoLite2-Country.mmdb | /usr/local/share/GeoIP/GeoLite2-Country.mmdb | ||
</code> | </code> | ||
- | Set **DB Name** to: ''%%COUNTRY_DB%%'' {{https://openlitespeed.org/wp-content/uploads/2018/07/iptogeo_config-2.jpg?805x397}} | + | Set **DB Name** to: ''%%COUNTRY_DB%%'' |
- | Similarly, add the city database by specifying **DB File Path:** ''%%/usr/local/share/GeoIP/GeoLite2-City.mmdb%%'' and **DB Name:** to: ''%%CITY_DB%%'' Navigate to **Web Admin > Configurations > Your Virtual Hosts > Rewrite** to add rewrite rules that will control the redirect: | + | {{https://openlitespeed.org/wp-content/uploads/2018/07/iptogeo_config-2.jpg?805x397}} |
+ | |||
+ | Similarly, add the city database by specifying **DB File Path:** ''%%/usr/local/share/GeoIP/GeoLite2-City.mmdb%%'' and **DB Name:** to: ''%%CITY_DB%%'' | ||
+ | |||
+ | Navigate to **Web Admin > Configurations > Your Virtual Hosts > Rewrite** to add rewrite rules that will control the redirect: | ||
<code> | <code> | ||
Line 28: | Line 32: | ||
</IfModule> | </IfModule> | ||
</code> | </code> | ||
+ | |||
Refer to [[http://dev.maxmind.com/geoip/legacy/mod_geoip2/#Redirecting_a_client_based_on_country|Maxmind]] for more rewrite examples. | Refer to [[http://dev.maxmind.com/geoip/legacy/mod_geoip2/#Redirecting_a_client_based_on_country|Maxmind]] for more rewrite examples. | ||
Line 36: | Line 41: | ||
== Method 1: == | == Method 1: == | ||
- | From [[https://hide.me/en/proxy|This site]], we can simply put in a web IP and choose a country from three(USA, Germany, Netherlands). If you want more than three countries, then you need to register for a paid plan. {{https://openlitespeed.org/wp-content/uploads/2018/06/Geo-3.png?887x381}} | + | From [[https://hide.me/en/proxy|This site]], we can simply put in a web IP and choose a country from three(USA, Germany, Netherlands). If you want more than three countries, then you need to register for a paid plan. |
+ | |||
+ | {{https://openlitespeed.org/wp-content/uploads/2018/06/Geo-3.png?887x381}} | ||
== Method 2: == | == Method 2: == | ||
- | You can choose a free proxy server from online free resources, e.g. [[https://free-proxy-list.net/|Free_Proxy]] {{https://openlitespeed.org/wp-content/uploads/2018/06/Geo-1.png?1011x484}} Setup the proxy IP with your browser. Here are the steps for Chrome: | + | You can choose a free proxy server from online free resources, e.g. [[https://free-proxy-list.net/|Free_Proxy]] |
+ | {{https://openlitespeed.org/wp-content/uploads/2018/06/Geo-1.png?1011x484}} | ||
+ | |||
+ | Setup the proxy IP with your browser. Here are the steps for Chrome: | ||
- Click on **Settings**. | - Click on **Settings**. | ||
Line 56: | Line 66: | ||
==== Step 4. Check Correct IP is Set ==== | ==== Step 4. Check Correct IP is Set ==== | ||
- | You can check source IP via LiteSpeed default php page ''%%http://yourdomain/index.php?act=phpinfo%%''. Check the ''%%$_SERVER%%'' variables, and look for the ones which begin with ''%%GEOIP_%%''. {{https://openlitespeed.org/wp-content/uploads/2018/07/geoenv.jpg?533x235}} The environment variables are based on the default environment definitions. The advanced section below shows you how to customize them for your environment to allow you to specify environment names, display language, additional databases, etc. | + | You can check source IP via LiteSpeed default php page ''%%http://yourdomain/index.php?act=phpinfo%%''. Check the ''%%$_SERVER%%'' variables, and look for the ones which begin with ''%%GEOIP_%%''. |
+ | |||
+ | {{https://openlitespeed.org/wp-content/uploads/2018/07/geoenv.jpg?533x235}} | ||
+ | |||
+ | The environment variables are based on the default environment definitions. The advanced section below shows you how to customize them for your environment to allow you to specify environment names, display language, additional databases, etc. | ||
==== Step 5. Check DB by Lookup Command ==== | ==== Step 5. Check DB by Lookup Command ==== |