A PHP form to automatically make a VirtualHost file with optional automatic Let's Encrypt support.
Not suitable for production servers as the PHP exec() function is not secure! In a future version I will create a workaround.
- Ensure the target domain is pointed at your IP!
- Edit the
config.php
file to your liking (currently set to apache2 defaults on Ubuntu). - Upload all three files to the same directory.
- Ensure your DirectoryRoot + VirtualHost folder's are set to 777
- Add the following to your
/etc/sudoers
file:www-data ALL=NOPASSWD: /path/to/new-vhost.php
- Nagivigate to
form.html
on your website. - Done!
- SSL support via certbot
- CSS it up ;D
- Domain validation in form
- redirect to homepage when action is completed