Vvveb works seamlessly on Apache, and most shared hosting environments require no manual configuration. This guide explains when configuration is needed and how to set up Apache correctly for both security and performance.


1. Shared Hosting & cPanel Users

If you're using shared hosting, cPanel, Plesk, or similar control panels:

  • You usually don’t need to configure Apache manually.
  • Vvveb includes a .htaccess file that Apache loads automatically.
  • Friendly URLs, routing, and caching work out of the box.

You can skip directly to installation.


2. Manual Apache Configuration (VPS / Dedicated Server)

If you're configuring Apache manually, follow these steps.

Step 1 - Copy the Vvveb Apache configuration

Vvveb includes a ready‑to‑use Apache virtual host file: apache-vvveb.conf.

Copy it into Apache’s sites-available directory and enable it:

sudo cp apache-vvveb.conf /etc/apache2/sites-available/vvveb.conf
sudo ln -s /etc/apache2/sites-available/vvveb.conf /etc/apache2/sites-enabled/vvveb.conf

Step 2 - Set your domain and document root

Edit the file:

sudo nano /etc/apache2/sites-available/vvveb.conf

Update the following lines:

ServerName www.mydomain.com
DocumentRoot /var/www/html/vvveb/public

Important:
The document root must point to the /public folder for maximum security.


Step 3 - Enable required Apache modules

Vvveb requires mod_rewrite for routing and clean URLs.

Enable it with:

sudo a2enmod rewrite
sudo systemctl restart apache2

If your homepage loads but all other pages show 404 Not Found, this module is not enabled.


3. File Permissions (Security Best Practices)

To keep your installation secure, ensure only the owner can write or execute sensitive PHP files.

Executable entry points

These files must be readable and executable only by the owner:

  • index.php
  • admin/index.php
  • install/index.php

Set permissions:

chmod 744 index.php admin/index.php install/index.php

Admin and Install folders

Restrict access to:

chmod 744 admin install

This prevents group and world users from modifying or executing files inside these directories.


4. Fixing Ownership Issues

If you uploaded files using SSH or a different user, Apache may not have permission to read them.

Set the correct owner:

sudo chown -R www-data:www-data /var/www/html/vvveb/

(Replace www-data with your Apache user if different.)


5. Restart Apache

After making changes, reload Apache:

sudo systemctl reload apache2

Or restart fully:

sudo systemctl restart apache2

6. Troubleshooting

Homepage works but other pages show 404

  • mod_rewrite is not enabled
  • .htaccess is not being read
  • AllowOverride All may be missing in your VirtualHost

Admin login not loading

  • Check permissions on admin/index.php
  • Ensure document root points to /public

PHP files download instead of running

  • PHP module or PHP‑FPM is not enabled
  • Missing libapache2-mod-php package