How to Install Landing CMS on Rocky Linux 8

Install Landing CMS on Rocky Linux 8 with Apache, PHP 8.2, HTTPS, SELinux-safe permissions, firewall rules, and a secure admin setup in minutes.
A glowing landing-page panel connected to a red-accented server rack by cyan light trails.

Install Landing CMS on Rocky Linux 8 with Apache and PHP 8.2 in about 15 minutes. You will finish with a database-free landing-page editor at your domain, HTTPS enabled, and file permissions that let the CMS write only where it needs to.

Prerequisites

  • Rocky Linux 8.10, fully updated, with at least 1 GB of RAM and 5 GB of free disk space.
  • SSH access as root, or a normal account with working sudo privileges.
  • A public domain such as YOUR_DOMAIN, with its DNS A record already pointing to the VPS.
  • Ports 22, 80, and 443 reachable from your workstation and the public Internet.
  • A VPSLake Linux VPS with a public IPv4 address if you need a server for this stack.
  • A long, unique password for the Landing CMS administrator account.

Landing CMS is an old, database-free alpha project. Its official repository documents release 0.0.6 and the file directories it must be able to write, so this guide pins that release rather than downloading an ever-changing branch.

The commands assume a non-root SSH account. If you are logged in as root, remove sudo from each command. Replace every uppercase placeholder before running a command.

Step 1: Install Apache, PHP, and firewalld

Apache serves the landing page, while Rocky Linux 8’s PHP 8.2 AppStream supplies the runtime and its common extensions.

sudo dnf upgrade -y
sudo dnf module reset php -y
sudo dnf module enable php:8.2 -y
sudo dnf install -y httpd php php-cli php-gd php-curl php-mbstring php-xml php-zip unzip curl firewalld policycoreutils-python-utils mod_ssl
sudo systemctl enable --now firewalld httpd
sudo firewall-cmd --permanent --zone=public --add-service=ssh
sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload
php -v
sudo apachectl configtest
sudo systemctl is-active httpd firewalld

You should see PHP 8.2, Syntax OK, and two active lines. Rocky’s PHP documentation uses the same AppStream selection. This installation uses Apache’s packaged PHP module; PHP-FPM is not needed for this small application.

Landing CMS does not query a database. MariaDB is therefore deliberately not installed or exposed: adding an unused database service would increase maintenance and the attack surface without helping this application.

Step 2: Download Landing CMS 0.0.6

Pinning the tagged archive makes a later repository change less likely to alter your production files unexpectedly.

cd /tmp
curl -fL -o landing-cms-0.0.6.zip https://github.com/Elias-Black/Landing-CMS/archive/refs/tags/0.0.6.zip
unzip -q landing-cms-0.0.6.zip
sudo install -d -o root -g apache -m 0750 /var/www/landing
sudo cp -a /tmp/Landing-CMS-0.0.6/. /var/www/landing/
sudo test -f /var/www/landing/install.php
sudo test -d /var/www/landing/cms/_db

The two tests print nothing when they pass. The first file is the project’s setup checker; cms/_db is a directory of plain-text application data, not a MariaDB database.

Set root ownership on the application code, then give Apache ownership only of the directories that accept CMS data or uploaded images. This prevents a PHP process from rewriting the application files themselves.

sudo chown -R root:apache /var/www/landing
sudo find /var/www/landing -type d -exec chmod 0750 {} +
sudo find /var/www/landing -type f -exec chmod 0640 {} +
sudo chown -R apache:apache /var/www/landing/assets/_cms/uploads/tinymce/source /var/www/landing/assets/_cms/uploads/tinymce/thumbs /var/www/landing/cms/_db
sudo find /var/www/landing/assets/_cms/uploads/tinymce/source -type d -exec chmod 0700 {} +
sudo find /var/www/landing/assets/_cms/uploads/tinymce/source -type f -exec chmod 0600 {} +
sudo find /var/www/landing/assets/_cms/uploads/tinymce/thumbs -type d -exec chmod 0700 {} +
sudo find /var/www/landing/assets/_cms/uploads/tinymce/thumbs -type f -exec chmod 0600 {} +
sudo find /var/www/landing/cms/_db -type d -exec chmod 0700 {} +
sudo find /var/www/landing/cms/_db -type f -exec chmod 0600 {} +

SELinux must allow Apache to read the site and write only those three data paths. Persistent file-context rules are safer than changing SELinux to permissive mode.

sudo semanage fcontext -a -t httpd_sys_content_t '/var/www/landing(/.*)?'
sudo semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/landing/assets/_cms/uploads/tinymce/source(/.*)?'
sudo semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/landing/assets/_cms/uploads/tinymce/thumbs(/.*)?'
sudo semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/landing/cms/_db(/.*)?'
sudo restorecon -Rv /var/www/landing

Step 3: Create the Apache virtual host

A dedicated virtual host sends requests for your domain to the CMS and disables directory listings.

Replace YOUR_DOMAIN in the block with the real hostname before you paste it. The file is named landing.conf, so the placeholder does not become part of a filename.

sudo tee /etc/httpd/conf.d/landing.conf > /dev/null <<'APACHE'
<VirtualHost *:80>
    ServerName YOUR_DOMAIN
    DocumentRoot /var/www/landing

    <Directory /var/www/landing>
        Options -Indexes +FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    DirectoryIndex index.php index.html
    ErrorLog /var/log/httpd/landing-error.log
    CustomLog /var/log/httpd/landing-access.log combined
</VirtualHost>
APACHE
sudo apachectl configtest
sudo systemctl reload httpd
Syntax OK

Check that the hostname resolves to this VPS before requesting a certificate. Apache can pass its local syntax test even when public DNS still points somewhere else.

Step 4: Enable HTTPS with Let’s Encrypt

TLS protects the administrator password and uploaded content while it travels between the browser and Apache.

Run this only after YOUR_DOMAIN resolves to the VPS and port 80 is reachable from the Internet. Replace ADMIN_EMAIL with an address that receives certificate notices.

sudo dnf install -y epel-release
sudo dnf install -y certbot python3-certbot-apache
sudo certbot --apache --redirect --agree-tos --no-eff-email --email ADMIN_EMAIL -d YOUR_DOMAIN
sudo certbot renew --dry-run

Certbot should report a successful simulated renewal. Its Apache documentation explains the plugin and renewal behavior if you later add another hostname.

Step 5: Complete the browser-based setup

The setup checker confirms the PHP runtime and write permissions before you create the CMS administrator.

  1. Open https://YOUR_DOMAIN/install.php. The checker should report that the application files are readable and the three data directories are writable.
  2. Open https://YOUR_DOMAIN/cms/ and create a long administrator password. Do not reuse the VPS, SSH, or email password.
  3. Sign in, create a first field such as a page title or hero message, and save it. The public PHP template can then read that field.
  4. After the password works, remove the setup checker so it cannot remain as a public diagnostic endpoint.
sudo rm -f /var/www/landing/install.php

Do not remove cms/_db or either TinyMCE upload directory. They contain the file-based settings, fields, original uploads, and thumbnails that the CMS needs after setup.

Verify the installation

These checks confirm that Apache and firewalld are running, PHP is the expected major version, HTTPS responds, and only the intended firewall services are enabled.

sudo systemctl is-active httpd firewalld
php -r 'echo PHP_MAJOR_VERSION, ".", PHP_MINOR_VERSION, PHP_EOL;'
curl -fsSI https://YOUR_DOMAIN/
curl -fsSI https://YOUR_DOMAIN/cms/
sudo firewall-cmd --zone=public --list-services
active
active
8.2
HTTP/1.1 200 OK
HTTP/1.1 200 OK
ssh http https

The /cms/ request may return a redirect to its login page rather than 200 OK; that is normal. The important checks are that the response stays on HTTPS and does not produce a 403, 404, or 5xx error.

Troubleshooting

The setup checker says a directory is not writable

Apache must own the three data paths, and SELinux must label them httpd_sys_rw_content_t. Reapply only those permissions instead of making the entire web root world-writable.

sudo chown -R apache:apache /var/www/landing/assets/_cms/uploads/tinymce/source /var/www/landing/assets/_cms/uploads/tinymce/thumbs /var/www/landing/cms/_db
sudo restorecon -Rv /var/www/landing/assets/_cms/uploads/tinymce/source /var/www/landing/assets/_cms/uploads/tinymce/thumbs /var/www/landing/cms/_db
sudo systemctl reload httpd

Apache returns 403 Forbidden

A wrong DocumentRoot, restrictive directory mode, or missing SELinux context is usually responsible. Inspect the active virtual host and restore the labels.

sudo apachectl -S
sudo restorecon -Rv /var/www/landing
sudo tail -n 40 /var/log/httpd/landing-error.log

The browser downloads PHP or shows a server error

The PHP package may be missing, or Apache may not have loaded its PHP module after the package change. Check the installed package and module list, then restart Apache.

rpm -q php
sudo httpd -M | grep -i php
sudo apachectl configtest
sudo systemctl restart httpd

The module check should show a PHP module and the configuration test should say Syntax OK.

Certbot cannot complete the HTTP-01 challenge

The domain may still resolve to an old address, or an upstream firewall may block port 80. Confirm the public route before retrying.

sudo firewall-cmd --zone=public --list-services
curl -I http://YOUR_DOMAIN/

A response from this server proves that HTTP reaches Apache; a timeout or a page from another server means DNS or an upstream firewall still needs correction.

Hardening

  • Back up /var/www/landing/cms/_db and both TinyMCE upload directories before changing the application or PHP packages.
  • Keep TCP port 3306 closed because this installation has no database listener.
  • Apply Rocky Linux security updates regularly and review /var/log/httpd/landing-error.log after upgrades.
  • Treat Landing CMS as legacy software: test PHP or application updates on a copy before changing the live files.

FAQ

Does Landing CMS need MariaDB or MySQL?

No. The CMS stores settings and fields in cms/_db, while TinyMCE stores uploaded files in its two upload directories. MariaDB is not part of the application’s request path for this deployment.

Which PHP version should I use on Rocky Linux 8?

This guide selects Rocky’s PHP 8.2 AppStream rather than the old default stream. The project is an unmaintained alpha, so test it on a staging VPS before using it for important content or upgrading the PHP stream later.

Why not use chmod 777 for the CMS folders?

World-writable permissions let any local process alter application data and can hide ownership mistakes. Apache owns only the three directories that must accept writes, while root owns the rest and SELinux supplies an additional access-control layer.

Can I install it using only the VPS IP address?

You can test Apache over an IP address, but a domain is the practical choice for a named virtual host and a normal Let’s Encrypt certificate. Point the DNS record to the VPS before starting the HTTPS step.

Samrat Ghosh
Written by

Samrat Ghosh

Founder & Infrastructure Engineer

Samrat Ghosh is the founder of VPSLake, where he builds and runs the remote desktop and VPS hosting infrastructure the company is built on. He writes hands-on guides about RDP, Windows Server, VPS management and secure remote access - the practical documentation he wishes had…

Previous Article

Windows Server Auto Login: Start Apps After a Reboot

Next Article

KVM vs QEMU: What Your VPS Actually Uses

Write a Comment

Leave a Comment

Your email address will not be published. Required fields are marked *

Subscribe to our Newsletter

Subscribe to our email newsletter to get the latest posts delivered right to your email.
Pure inspiration, zero spam ✨