How to Install Vanilla Forums with OpenLiteSpeed on Ubuntu 20.04

how to install vanilla forums with openlitespeed on ubuntu 20.04

Vanilla Forums is a modern, lightweight, and open-source multi-lingual forum software written in PHP. It provides all of the features you need to run a successful forum. It’s easy to install and use, and the flexibility and free nature of Vanilla Forums make it an attractive choice for anyone looking to start their own forum.

OpenLiteSpeed is a lightweight, open-source HTTP server developed and copyrighted by LiteSpeed Technologies, Inc. It provides a user-friendly web interface and supports various operating systems, including Linux, Mac OS, SunOS, and FreeBSD.

In this tutorial, we will show you how to install and configure Vanilla Forum with OpenLiteSpeed on an Ubuntu 20.04 VPS.

Prerequisites

  • For the purposes of this tutorial, we will be using an Ubuntu 20.04 VPS.
  • SSH access with root privileges or a regular system user with sudo privileges

Step 1: Connect to Your Server

First, log in to your Ubuntu 20.04 server through SSH as the root user or any other user with sudo privileges:

ssh root@IP_Address -p Port_Number

Of course, you will need to replace IP_Address and Port_Number with your actual server IP address and SSH port number.

Then, run the following command to make sure that all installed packages on the server are updated to the latest available version:

apt update && sudo apt upgrade

Step 2: Download and Install OpenLiteSpeed

The following command will add the necessary repository to your server for the OpenLiteSpeed server installation.

wget -O - http://rpms.litespeedtech.com/debian/enable_lst_debain_repo.sh | bash

To install the latest version of the OpenLiteSpeed server, run the following command:

apt install openlitespeed

Once, the installation is complete you can check the status of the OpenLiteSpeed service:

systemctl status lshttpd

You should get the following output:

● lshttpd.service - OpenLiteSpeed HTTP Server
     Loaded: loaded (/etc/systemd/system/lshttpd.service; enabled; vendor preset: enabled)
     Active: active (running)
    Process: 39250 ExecStart=/usr/local/lsws/bin/lswsctrl start (code=exited, status=0/SUCCESS)
   Main PID: 39278 (litespeed)
     CGroup: /system.slice/lshttpd.service
             ├─39278 openlitespeed (lshttpd - main)
             ├─39287 openlitespeed (lscgid)
             └─39331 openlitespeed (lshttpd - #01)

To enable the OpenLiteSpeed service to start on system reboot execute the following command:

systemctl enable lshttpd

By default, OpenLiteSpeed listens on port 8088. It is recommended that you change the default port to 80. To do so, edit the OpenLiteSpeed default configuration file:

nano /usr/local/lsws/conf/httpd_config.conf

Find the following lines:

listener Default{
    address                  *:8088
    secure                   0
    map                      Example *
}

And, replace the port 8088 to 80:

listener Default{
    address                  *:80
    secure                   0
    map                      Example *
}

Save and close the file, then restart the OpenLiteSpeed service to apply the changes:

systemctl restart lshttpd

Open your browser and type the server IP address:

http://your-ip-address

You should see the OpenLiteSpeed default page:

install vanilla forums with openlitespeed on ubuntu 20.04

Step 3: Install and Configure MariaDB Server

Run the following command to install the latest MariaDB server from the official Ubuntu repositories:

apt install mariadb-server

Once it is installed, start the MariaDB service and enable it to automatically start up after the server boots up:

systemctl start mariadb
systemctl enable mariadb

After the installation is completed, you can improve the security of your MySQL server, by running the mysql_secure_installation script:

mysql_secure_installation

We recommend answering every prompt with ‘Y’.

Step 4: Create MariaDB Database and User

Once this is done, create a new MariaDB database and user for the Vanilla Forums installation.

First, log in to MariaDB with the following command:

mysql -u root -p

Once login, create a database, user, and grant privileges for the user to access the database:

MariaDB [(none)]> CREATE DATABASE vanillaforum;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON vanillaforum.* TO 'vanillaforum'@'localhost' IDENTIFIED BY 'Password';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;

Don’t forget to replace ‘Password’ with an actual strong password.

Step 5: Install PHP and Modules

By default, OpenLiteSpeed is configured to use PHP  7.4. To check this simply access the following URL:

http://your-ip-address/phpinfo.php

You should receive the following screen:

install vanilla forums with openlitespeed on ubuntu

To install all the necessary modules for Vanilla Forum, run the following command:

apt install lsphp74-intl lsphp74-mysql lsphp74-curl lsphp74-imagick lsphp74-dev

Then restart the OpenLiteSpeed service to apply the changes:

systemctl restart lshttpd

Step 6: Download Vanilla Forum

Download the latest stable release of the software to your server:

cd /tmp
wget https://open.vanillaforums.com/get/vanilla-core-2021.009.zip

Once it is downloaded, unpack the downloaded ZIP archive to the document root directory of your server:

unzip vanilla-core-2021.009.zip -d /usr/local/lsws/Example/html/

Rename the extracted directory named package to vanilla (this is optional, however, it makes it easier to type and memorize where your files are) with the following command:

mv /usr/local/lsws/Example/html/package /usr/local/lsws/Example/html/vanilla

We also need to set the correct permissions of this directory so our OpenLiteSpeed server can access the files in it:

chown -R nobody:nogroup /usr/local/lsws/Example/html/vanilla

Step 7: Configure OpenLiteSpeed

The OpenLiteSpeed server has an admin dashboard. To access it securely, you need to create an admin account and set a password:

/usr/local/lsws/admin/misc/admpass.sh

Set your admin username and password as shown below:

Please specify the user name of the administrator.
This is the user name required to log in to the administration Web interface.

User name [admin]: admin

Please specify the administrator's password.
This is the password required to login the administration Web interface.

Password: 
Retype password: 
Administrator's username/password is updated successfully!

Now, open your favorite browser and browse to the OpenLiteSpeed admin panel at:

https://your-ip-address:7080

install vanilla forums openlitespeed on ubuntu 20.04

Enter your admin username and password and click on the Login button. You should see the OpenLiteSpeed dashboard on the following page:

install vanilla forums openlitespeed ubuntu 20.04

Navigate to Virtual Hosts > Example > General and modify:

Document Root:$VH_ROOT/html/vanilla/
Index Files: index.html, index.php

Need a fast and easy fix?
✔ Unlimited Managed Support
✔ Supports Your Software
✔ 2 CPU Cores
✔ 2 GB RAM
✔ 50 GB PCIe4 NVMe Disk
✔ 1854 GeekBench Score
✔ Unmetered Data Transfer
NVME 2 VPS

Now just $43 .99
/mo

GET YOUR VPS

installing vanilla forums with openlitespeed on ubuntu 20.04

Navigate to  Virtual Hosts > Example > Rewrite and modify:

Enable Rewrite:Yes
Auto Load from .htaccess: Yes

installing vanilla forums with openlitespeed on ubuntu

Step 8: Complete the Vanilla Forum Installation

To finish the Vanilla Forum installation, open your browser, navigate to: https://your-ip-address and follow the instructions:

 

installing vanilla forums openlitespeed on ubuntu 20.04

Fill in the required information and then, click on the ‘Continue’ button and you will automatically be logged in to the Vanilla Forums administration back-end:

 

installing vanilla forums openlitespeed ubuntu 20.04

That’s it! Vanilla Forums has been successfully installed on your Ubuntu 20.04 server.

Of course, you don’t have to know how to install Vanilla Forums with OpenLiteSpeed on Ubuntu 20.04 if you have Managed Ubuntu Hosting with us. You can simply ask our support team to install Vanilla Forums with OpenLiteSpeed on Ubuntu 20.04 for you. They are available 24/7, and will be able to help you with the installation of Vanilla Forums with OpenLiteSpeed on Ubuntu 20.04.

PS. If you enjoyed reading this blog post on how to install Vanilla Forums with OpenLiteSpeed on Ubuntu 20.04, feel free to share it on social networks or simply leave a comment in the comments section. Thank you.

Leave a Comment