Create directory
$ cd /etc/apache2
$ mkdir encrypted-config
Set permissions
$ chmod 700 encrypted-config
$ chown www-data:www-data encrypted-config
$ cd encrypted-config
Upload files
$ scp aes256.php [email protected]:/tmp
$ scp encrypted-config.php [email protected]:/tmp
Move files to proper directory
$ mv /tmp/aes256.php /etc/apache2/encrypted-config/
$ mv /tmp/encrypted-config.php /etc/apache2/encrypted-config/
Set permissions
$ chmod 600 aes256.php
$ chmod 600 encrypted-config.php
$ chown www-data:www-data aes256.php
$ chown www-data:www-data encrypted-config.php
Create new directory to house .ini file (Or store them anywhere you like, as long as it's NOT IN THE PROJECT DIRECTORY)
$ mkdir /etc/apache2/encrypted-config/project-name
Upload template to use
$ scp encrypted-config-template.php [email protected]:/tmp
Move template to proper directory, and rename to be project-specific
$ mv /tmp/encrypted-config-template.php /etc/apache2/encrypted-config/project-name/project-name.php
Edit this file to reflect proper project credentials
Then, create the .ini file
$ sudo touch /etc/apache2/encrypted-config/project-name/project-name.ini
$ sudo php project-name.php
DELETE UNENCRYPTED TEMPLATE FILE
$ rm /etc/apache2/encrypted-config/project-name/project-name.php