Deploying the Web Panels

28. Deploying the Web Panels (Shared Hosting vs VPS)

All three panels are Laravel applications and can run on shared hosting (cPanel) or on a VPS/dedicated server. Choose the approach that matches your hosting.

28.1. Shared hosting (cPanel)

Best for getting started quickly when you do not have SSH/root access.

  1. Create a MySQL database and user (see Admin Panel Setup).
  2. Upload each panel’s ZIP to its domain/subdomain folder and extract it. Point the document root at the panel’s public/ directory (or use the supplied .htaccess).
  3. Shared hosting usually has no Composer, so run composer install on your own machine first and upload the project with its vendor/ folder already installed.
  4. Configure .env (database + Firebase credentials) and place credentials.json in storage/app/firebase/.
  5. Set writable permissions (typically 755) on storage/ and bootstrap/cache/.
  6. Import that panel’s supplied .sql file into its database through phpMyAdmin → Import in cPanel. No Artisan or shell access is needed for this step.
  7. Add the Laravel scheduler as a cron entry under Cron Jobs — see Cron & Scheduled Tasks.

Note: make sure your host runs PHP 8.2+ with the required extensions and that mod_rewrite is enabled. The Admin Panel’s scheduled jobs need Node.js, which basic shared plans often lack — choose a plan that offers it, or use a VPS.

28.2. VPS / dedicated server

Recommended for production — you get SSH access, Composer, Node.js and full control.

  1. Install the stack: PHP 8.2+, Composer, MySQL/MariaDB, Node.js and a web server
    (Nginx or Apache).
  2. Upload or clone each project, then run composer install (and npm install for the Admin Panel).
  3. Copy .env.example to .env, set the database and Firebase credentials, then run php artisan key:generate.
  4. Import that panel’s supplied .sql file: mysql -u user -p database < panel.sql.
  5. Point each server block’s document root at that project’s public/ directory.
  6. Set ownership/permissions so the web server can write to storage/ and bootstrap/cache/.
  7. Add the scheduler to the system crontab (* * * * * php /path/artisan schedule:run) — see Cron & Scheduled Tasks.
  8. For production, run php artisan config:cache and php artisan route:cache, and serve everything over HTTPS.

28.3. Common deployment pitfalls (.htaccess & shared hosting)

  • Only the home page works; every other route returns 404.
    mod_rewrite is disabled or AllowOverride is not All, so Laravel’s public/.htaccess is ignored.
  • App installed in a sub-folder. Add a RewriteBase to public/.htaccess, e.g. RewriteBase /foodie/.
  • Document root points at the project root instead of public/. Point the domain at public/, or add a root .htaccess that rewrites into it. Never serve the project root — it makes .env and storage/app/firebase/credentials.json reachable from the internet.
  • 404 on uploaded images / assets. Run php artisan storage:link (or create the public/storage link manually if symlinks are blocked).
  • 500 error after upload. Usually permissions — set 755 on storage/ and bootstrap/cache/, and confirm PHP is 8.2+.
  • “No input file specified”. A PHP handler / CGI mismatch on some cPanel hosts — add the host’s recommended handler line (or Options -MultiViews) to .htaccess.
  • Mixed-content warnings over HTTPS. Set APP_URL to your https:// domain and force HTTPS in .htaccess.

28.4. SSL / HTTPS configuration (production)

Always serve all three panels over HTTPS. Firebase Authentication, payment-gateway callbacks and secure cookies all require it, and browsers block mixed content on pages that are not fully secure.

Shared hosting (cPanel). Most hosts issue a free certificate automatically. Open cPanel → Security → SSL/TLS Status (or Let’s Encrypt / AutoSSL), select your domains, and click Run AutoSSL.

VPS / dedicated server. Install a free Let’s Encrypt certificate with Certbot:

# Nginx
sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d yourdomain.com -d admin.yourdomain.com -d restaurant.yourdomain.com
# Apache
sudo apt install certbot python3-certbot-apache
sudo certbot --apache -d yourdomain.com

Certbot installs the certificate and adds an automatic renewal timer.

Force HTTPS. Add this at the top of each panel’s public/.htaccess, just inside <IfModule mod_rewrite.c> and before Laravel’s front-controller rules:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Then finish up:

  • Set APP_URL=https://… in every panel’s .env.
  • In Firebase console → Authentication → Settings → Authorized domains, add all three HTTPS domains so sign-in works.
  • Update the OAuth 2.0 client’s authorised origins and redirect URIs to the HTTPS versions.
  • Re-cache the config: php artisan config:cache.