From OpenLiteSpeed Wiki

Revision as of 18:39, 28 February 2018 by Tishu (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Install Drupal 8 on openlitespeed

In the following article we will guide you through the steps to set up Drupal, a popular open source content management system (CMS) written in PHP, on OpenLiteSpeed. Drupal is especially easy to install. You need make no substantial changes to your OpenLiteSpeed settings. If you do not have OpenLiteSpeed installed you can check this guide for that. To setup LSPHP, check this guide. You can use this article for the installation of Drupal 7.

Download Drupal 8

In this guide we will use default Example virtual host, but you can setup your own here. Change directory:

cd /usr/local/lsws/DEFAULT/html

Download Drupal 8:


Note - 8.4.4 is the latest (stable) version of Drupal as of this writing. You can check for newer releases here.

Unzip the files and move them to the "drupal" directory:

tar zxf drupal-8.4.4.tar.gz
mv drupal-8.4.4 drupal
rm drupal-8.4.4.tar.gz

Install Drupal 8

The installation process is web based, so you need to open your web browser and enter your virtual host name (domain name), like http://localhost:8088/drupal/install.php.

Follow the steps from the installer. If you do not have a MySQL database set up, you can do it this way:

yum install mysql mysql-server
service mysqld start
mysql -u adminusername -p
mysql> create database drupal;
mysql> grant all privileges on drupal.* to db_user@'localhost' identified by 'password';
mysql> exit

Post-Install Options

After successfully installing Drupal 8, you need to edit the rewrite rules in OpenLiteSpeed Web Admin. Navigate to the Web Admin -> Virtual hosts -> View the host -> Rewrite tab.

Enable Rewrite from Rewrite Control and put these rules in the Rewrite Rules field:

ReWriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^/ index.php [L]

Save, restart OpenLiteSpeed, and you will be ready to use your Drupal site.