Let’s explore the steps to enable Geolocation in LiteSpeed. Bobcares, as a part of our Server Management Services, offers solutions to every query that comes our way.
Enabling Geolocation In LiteSpeed
The LiteSpeed server can handle more traffic with fewer processes, which saves resources and improves page speed. Enabling Geolocation on LiteSpeed helps LiteSpeed Web Server’s site software/plugins to determine the country/city from which visitors are connecting.
In the LSWS WEB Admin Console settings, there are two sections: IP to GeoLocation DB and IP2Location DB. Use IP to GeoLocation DB for both the MaxMind Legacy DB and the MaxMind GeoIP2 DB, and IP2Location DB for the IP2Location database. Only one location DB should be used at a time.
Steps To Enable Geolocation In LiteSpeed
In order to set up and enable GeoIP or IP2Location on LSWS, we have to run some steps. Firstly, we need to choose a database. Then download and install the DB to a directory. Then configure the DB path in LSWS Admin. Also, enable GeoIP or IP2Location through the Apache configuration. And lastly, conduct certain tests. Let’s look into the details:
- Firstly, turn on “GeoIPEnable” in Apache config.
Go to to WHM >> Service Configuration >> Apache Configuration >> Include Editor >> Pre Main Include. Select All Versions in the dropdown box. Add the following to the text box. And also add it directly to pre_main_global.conf through the command line.
<IfModule LiteSpeed> GeoIPEnable On </IfModule>
- Now upload the db GeoLite2-Country_20220923.tar.gz file to the server and move to the location /usr/share/GeoIP/.
- Unzip the tar file using the below code:
tar -xvf GeoLite2-Country_20220923.tar.gz
- Copy all files in the tar file to different folders.
cp -pr * ../
- Then set up the DB.
Configure the database location and name in LSWS WebAdmin. We can select COUNTRY_DB for a country DB and CITY_DB for a city DB. Go to Configuration >> Server >> General >> General settings and set IP2Location DB to the database path. Then set DB Name to COUNTRY_DB or CITY_DB.
- Finally, enable Geolocation Lookup >> Yes in General settings.
[Looking for a solution to another query? We are just a click away.]
Conclusion
To conclude, we provide a quick and simple method from our Tech team to enable geolocation in LiteSpeed web servers.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
var google_conversion_label = "owonCMyG5nEQ0aD71QM";
0 Comments