Deploying the Portal on a VPS with Apache

Step-by-step guide to configuring Apache VirtualHosts, .htaccess rewrites, CORS, and php.ini for the Rediafile Developer Portal.

Deploying on a VPS with Apache

This guide walks through deploying the Rediafile Developer Portal on a standard Apache + PHP VPS.

1. Apache VirtualHost

Create a VirtualHost pointing to the public/ directory:

<VirtualHost *:80>
    ServerName portal.example.com
    DocumentRoot /var/www/rediafile-php/public
    <Directory /var/www/rediafile-php/public>
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

2. Enable mod_rewrite

sudo a2enmod rewrite
sudo systemctl reload apache2

3. .htaccess

The included .htaccess rewrites all requests to index.php and raises PHP upload limits to 10 GB.

4. Permissions

Make the storage/ directory writable:

sudo chown -R www-data:www-data storage/
sudo chmod 775 storage/
Edit article