Skip to content

Configure Apache2 for PIA

Kevin Beyrand edited this page Jan 26, 2024 · 4 revisions

Create a new VirtualHost:

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

And paste:

<VirtualHost *:80>
        ServerName _YOUR_DOMAIN_NAME_

        ServerAdmin _YOUR_EMAIL_SUPPORT_
        DocumentRoot /var/www/pia/dist/pia-angular
        ErrorLog ${APACHE_LOG_DIR}/error_pia.log
        CustomLog ${APACHE_LOG_DIR}/access_pia.log combined

        <Directory /var/www/pia/dist/pia-angular>
                Allow from all
                Options -MultiViews
        </Directory>
</VirtualHost>

Enable this new site:

sudo a2ensite pia && sudo systemctl reload apache2