Setup LiteSpeed Memcached with WordPress in Virtualmin

Setup LiteSpeed Memcached with WordPress in Virtualmin

Setting up LiteSpeed Web Server with Virtualmin involves several steps, including installing the LiteSpeed Web Server, configuring Virtualmin to use LiteSpeed, and setting up your website to run on LiteSpeed. Here’s how to do it:

Step 1: Install LiteSpeed Web Server

  1. Download LiteSpeed Web Server:

First, download the LiteSpeed Web Server package:

wget https://www.litespeedtech.com/packages/5.0/lsws-5.4.10-std-i386-linux.tar.gz
tar -zxvf lsws-5.4.10-std-i386-linux.tar.gz
cd lsws-5.4.10
  1. Install LiteSpeed Web Server:

Run the installation script:

sudo ./install.sh
  • Enter the installation directory: You can accept the default directory /usr/local/lsws by pressing Enter.
  • Admin username and password: Create an admin username and password for accessing the LiteSpeed WebAdmin console.
  • Port number: By default, LiteSpeed WebAdmin console runs on port 7080.
  • License key: If you have a license key, enter it when prompted. If you’re using the free version, you can skip this step.
  1. Start LiteSpeed Web Server:

After installation, start the LiteSpeed Web Server:

sudo /usr/local/lsws/bin/lswsctrl start

Step 2: Configure Virtualmin to Use LiteSpeed

  1. Stop Apache Web Server:

Virtualmin uses Apache by default, so you need to stop Apache to allow LiteSpeed to take over:

sudo systemctl stop httpd
sudo systemctl disable httpd
  1. Configure Virtualmin to Recognize LiteSpeed:

In Virtualmin, you need to tell it to manage the LiteSpeed Web Server instead of Apache.

  • Log in to Virtualmin.
  • Navigate to Webmin > Servers > Apache Webserver.
  • Click on Module Config in the top-left corner.
  • Under System configuration, set Path to the apachectl command to the LiteSpeed control script: /usr/local/lsws/bin/lswsctrl.
  • Set Command to start apache to /usr/local/lsws/bin/lswsctrl start.
  • Set Command to stop apache to /usr/local/lsws/bin/lswsctrl stop.
  • Set Command to apply configuration to /usr/local/lsws/bin/lswsctrl restart.

Save the changes.

  1. Re-check Configuration:
  • Go to Virtualmin > System Settings > Re-Check Configuration.
  • Virtualmin should now recognize that LiteSpeed is the active web server.

Step 3: Set Up Websites to Run on LiteSpeed

  1. Configure Virtual Hosts:

LiteSpeed uses the same configuration files as Apache. Your existing Virtual Hosts should work without changes, but it’s a good idea to review and ensure everything is correctly set up.

  • Go to Webmin > Servers > LiteSpeed WebAdmin Console.
  • Log in using the admin credentials you set up earlier.
  • Navigate to Virtual Hosts and review your existing configurations.
  1. Restart LiteSpeed Web Server:

If you’ve made any changes to your virtual host configurations, restart LiteSpeed:

sudo /usr/local/lsws/bin/lswsctrl restart

Step 4: Access LiteSpeed WebAdmin Console

  • Open your browser and go to http://your-server-ip:7080.
  • Log in with the admin credentials you set up during installation.

Step 5: Test Your Websites

Visit your websites to ensure they are running correctly on the LiteSpeed Web Server. You should notice improved performance due to LiteSpeed’s optimized handling of web traffic.

Step 6: Optional: Install LiteSpeed Cache Plugin for WordPress

If you are running WordPress sites, you can enhance performance further by installing the LiteSpeed Cache plugin:

  • Go to Plugins > Add New in WordPress.
  • Search for "LiteSpeed Cache" and install it.
  • Configure the plugin in the WordPress admin panel to take advantage of LiteSpeed’s caching capabilities.

By following these steps, you should have LiteSpeed Web Server fully integrated with Virtualmin and hosting your websites with improved performance.

About the Author
Admin
DarazHost has been providing quality Web Hosting services since 2014. Our Goal at DarazHost is to provide high quality managed web hosting services at the lowest possible rate and the highest customer satisfaction. We focus mainly on up-time and client satisfaction, with the fastest servers on the market and an equally fast support team, our performance is second to none. A unique aspect of our company can be seen in the high level of support that is guaranteed with all the plans we have available.

Leave a Reply