This post shows students and new users how to install Drupal CMS on Ubuntu Linux with an OpenLiteSpeed web server.
When web admins think of hosting a Drupal website, most choose between Apache and Nginx web servers.
Few people have heard of OpenLiteSpeed, not because it’s bad, but because it’s not widely used or popular. Many good things have been written about OpenLiteSpeed, and if you want to test it yourself, continue below.
OpenLiteSpeed is an open-source web server developed by LiteSpeed Technologies. It is designed to be lightweight and comes with an admin panel to manage the server easily from your favorite web browsers.
If you want to run your Drupal website on OpenLiteSpeed instead of Apache or Nginx, continue below to learn how to install it and run Drupal.
How to install OpenLiteSpeed on Ubuntu Linux
We have written a post about installing OpenLiteSpeed on Ubuntu Linux. Before installing Drupal, click on the link below to install OpenLiteSpeed.
This post below shows you how to install OpenLiteSpeed, the latest PHP version, and the MariaDB database server. Those three components are required to run Drupal.
How to Install OpenLiteSpeed on Ubuntu Linux – Website for Students
After installing OpenLiteSpeed, continue below.
How to download Drupal on Ubuntu Linux for OpenLiteSpeed
Now that OpenLiteSpeed is installed, download the package to install. Run the commands below to download the latest version of Drupal.
cd /tmp wget https://www.drupal.org/download-latest/tar.gz tar -zxvf tar.gz
After extracting the Drupal archive, move the content into the OpenLiteSpeed default VirtualHost directory.
sudo mv /tmp/drupal-* /usr/local/lsws/Example/drupal
Next, run the commands below to change the permissions of the Drupal folder to run on OpenLiteSpeed.
sudo chown -R nobody:nogroup /usr/local/lsws/Example/drupal/ sudo chmod -R 755 /usr/local/lsws/Example/drupal/
How to create a Drupal database on Ubuntu
At this point, we’re ready to create a Drupal database. As mentioned above, Drupal uses databases to store its content.
To create a database for Drupal, run the commands below:
sudo mysql -u root -p
Then, create a database called drupaldb
CREATE DATABASE drupaldb;
Next, create a database user called drupaldbuser and set a password
CREATE USER 'drupaldbuser'@'localhost' IDENTIFIED BY 'new_password_here';
Then, grant the user full access to the database.
GRANT ALL ON wpdb.* TO 'drupaldbuser'@'localhost' WITH GRANT OPTION;
Finally, save your changes and exit.
FLUSH PRIVILEGES; EXIT;
How to configure OpenLiteSpeed to support Drupal
Next, log on to the OpenLiteSpeed admin panel to configure Drupal settings.
https://localhost:7080/login.php
Login using the admin login details above.

After logging on, go to the Virtual Hosts ==> General tab and edit the Document Root location section.
Then, edit the Document Root to point to the Drupal folder created above.
$VH_ROOT/drupal/

On the same General tab, edit the Index Files section and replace index.html with index.php, as shown below.
index.php

Next, go to Virtual Hosts ==> Rewire Rules, edit Rewrite Control, then choose Yes to enable rewrite.
Save your change.

Next, under Virtual Hosts ==> Rewrite, edit the Rewrite Rules. Copy and paste the lines below into the rules box and save.
ReWriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^/ index.php [L] <IfModule LiteSpeed> CacheLookup on </IfModule>

After making all the changes above, reload OpenLiteSpeed.

Finally, open your web browser and browse to the server hostname or IP address.
http://localhost
A Drupal setup wizard should appear. Follow the wizard to complete the setup.
Select the installation language, then click Save and Continue.

On the next screen, choose the Standard installation option to include commonly used pre-configured features.
This is the most popular option for most websites running Drupal CMS.

Next, type in the database connection info, click Save and continue.

After that, enter the site information, including the Site name, Site admin email address, username, and password, and continue.

When you’re done, Drupal should be installed and ready to use. Login as admin and begin configuring your site.

That should do it!
Conclusion:
This post showed you how to install Drupal on Ubuntu Linux with an OpenLiteSpeed web server. Please use the comment form below if you find any errors above or have something to add.
Leave a Reply Cancel reply