Skip to main content

Drupal LOMP Marketplace App

Version: Drupal 10.0.7   |   OS: Ubuntu 22.04

Overview

The Drupal LOMP Marketplace App provides a production-ready environment for Drupal, optimized with OpenLiteSpeed as the web server for high performance and scalability. This instance bundles the following components for a seamless Drupal hosting experience:

  • OpenLiteSpeed (1.7.16): High-performance web server with HTTP/3 support.
  • Drupal (10.0.7): Robust open-source content management system.
  • MariaDB (10.6.12): Reliable and secure database server.
  • PHP (8.1): Modern PHP version for compatibility and speed.
  • Certbot (1.21.0): Automated SSL certificate management.
  • Drush (11.5.1): Command-line shell for Drupal administration.
  • Postfix (3.4.13): Mail server for outbound email.

Getting Started

1. Firewall & Access

Upon deployment, ensure your security group or firewall allows access only to these essential ports:

PortServicePurpose
22SSH (rate limited)Server access
80HTTPWeb access
443HTTPSSecure web access
7080OpenLiteSpeed AdminWeb server console

Restrict access to only trusted IPs whenever possible.


2. First Boot & Auto-Configuration

During the initial boot:

  • The system will run mysql_secure_installation.
  • Admin passwords for Drupal and OpenLiteSpeed are set.
  • Initial Drupal configuration is created and connected to the database.

Important:
You will be disconnected from the SSH session and see a message like:

Please wait until the installation is completed....
Connection to $IPADDRESS closed.

Do not log in to the instance for at least 2 minutes after creation. This ensures auto-configuration completes successfully.


3. Accessing the Instance

  • Log in using the username ubuntu and your chosen password or uploaded SSH key.
  • To elevate privileges, run:
  sudo su -
  • The Drupal auto-setup script runs automatically on first login.

After login, please wait until you see the installation completion message.


4. Completing the Drupal Setup

  • You will be prompted to enter your domain name (e.g., example.org).

Note: The domain’s A record must already point to your instance’s public IP.

  • On completion, credentials and configuration details will be displayed.
  • To cancel setup, press Ctrl+C – the script will run again on your next login.

When installation is complete, you’ll see:

Installation completed. Access your new Drupal site in a browser to continue.

Now, visit your domain or server IP in a browser to view your Drupal site.


5. Credential and Configuration Locations

File/PathDescription
/root/.mariadb_root_passwordMariaDB root password
/root/.drupal_database_detailsDrupal database connection info
/root/.Drupal_Admin_Login_CredentialsDrupal Admin login credentials
/root/.Litespeed_Admin_PasswordOpenLiteSpeed Admin password
  • MariaDB:

  • Login: mysql (as root, via unix_socket)

  • User dbadmin: Full access, password-authenticated

  • For security, do not change root’s unix_socket authentication.

  • phpMyAdmin:
    Access at http://[Instance-IP]/phpmyadmin

  • PHP Info:
    View at http://[Instance-IP]/phpinfo.php

  • OpenLiteSpeed Admin Panel:
    Access at http://[Instance-IP]:7080

  • Web root directory: /var/www/html/


6. SSL (HTTPS) Configuration

Certbot is included for automated SSL certificate setup.

Prerequisites:

  • Registered domain name with A records for both example.com and www.example.com pointing to the instance.

Steps:

  1. Issue the SSL certificate:
certbot certonly -d example.com -d www.example.com -w /var/www/html/
  1. To automatically redirect HTTP to HTTPS:
  • Edit /usr/local/lsws/conf/vhosts/drupal/vhconf.conf

  • Update the rewrite section as shown:

    rewrite  {
    enable 1
    autoLoadHtaccess 1
    rules <<<END_rules
    RewriteCond %{SERVER_PORT} ^80$
    RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
    END_rules
    }
  1. Restart OpenLiteSpeed:
/usr/local/lsws/bin/lswsctrl fullrestart
  1. Firewall:
    Allow port 443 (HTTPS). Optionally, restrict or deny port 80 (HTTP) once HTTPS is verified.

7. Outbound Email (Postfix) Setup

  • Set a valid hostname for your instance: hostnamectl set-hostname your.domain.com

  • Ensure the hostname has an A record and the IP has a proper PTR record.

  • Update /etc/postfix/main.cf:


myhostname = your.domain.com
  • Restart Postfix:
systemctl restart postfix
  • Test outgoing mail:
echo “Postfix test” | mail -s “Subject” youremail@example.com

Note:

  • Initial emails may be marked as spam. Once IP reputation is established, delivery will improve.

Troubleshooting & Best Practices

  • Wait for initial setup to complete:
    Logging in before auto-setup finishes may cause incomplete configuration.
  • DNS:
    Always ensure your domain’s DNS records are set before running setup.
  • Credential Safety:
    All important passwords and configuration details are stored in /root/ for your reference.

For further assistance, contact Webberstop Cloud Support.