WebbyCMS 2.0

A lightweight PHP framework for simple, scalable and stable websites. Welcome to use WebbyCMS This page is the live demo, hosted at https://webbycms.brandon.my.

How this site is hosted

webbycms.brandon.my runs the exact code in this repository, served from a single instance behind Cloudflare. The full step-by-step guide lives in HOSTING.md.

Architecture

  1. Browser loads https://webbycms.brandon.my — TLS is terminated at the Cloudflare edge.
  2. Cloudflare edge follows a CNAME to the webbycms Cloudflare tunnel.
  3. cloudflared (systemd unit cloudflared-webbycms.service) forwards to http://localhost:80.
  4. Apache vhost webbycms.brandon.my on port 80 matches the Host header.
  5. PHP 8.3 (mod_php) executes index.php; .htaccess rewrites friendly URLs to the front controller.
  6. The app root is /var/www/webbycms.brandon.my; pages live in pages/{page}/index.php.

Edge & DNS

  • Domain on Cloudflare (NS bjorn/lisa.ns.cloudflare.com)
  • Per-hostname tunnel webbycmslocalhost:80
  • Free TLS via Cloudflare; no local 443 needed

Web server

  • Apache vhost on *:80, AllowOverride All
  • PHP 8.3 mod_php + mod_rewrite
  • .env and dotfiles denied (FilesMatch → 403)
  • Site logs in /var/log/apache2/

Application

  • Production .env: APP_DEBUG=false
  • Anonymous page cache → storage/cache
  • Lazy sessions; CSRF enforced on POSTs
  • Errors logged to storage/logs/app.log

Hosting guide

Every step to reproduce this deployment — code deploy, composer install, .env, permissions, the Apache vhost, the Cloudflare tunnel (cloudflared tunnel create, config, route dns, systemd), verification commands, operations and troubleshooting — is documented in HOSTING.md.

Form post handling sample

Submitting this form POSTs to /pages/home/forms/sample.php and redirects back here.