Skip to content
This repository was archived by the owner on Nov 6, 2021. It is now read-only.

Latest commit

 

History

History
20 lines (17 loc) · 807 Bytes

README.md

File metadata and controls

20 lines (17 loc) · 807 Bytes

PHP-VirtualHost-Form

A PHP form to automatically make a VirtualHost file with optional automatic Let's Encrypt support.

Note:

Not suitable for production servers as the PHP exec() function is not secure! In a future version I will create a workaround.

Usage:

  1. Ensure the target domain is pointed at your IP!
  2. Edit the config.php file to your liking (currently set to apache2 defaults on Ubuntu).
  3. Upload all three files to the same directory.
  4. Ensure your DirectoryRoot + VirtualHost folder's are set to 777
  5. Add the following to your /etc/sudoers file: www-data ALL=NOPASSWD: /path/to/new-vhost.php
  6. Nagivigate to form.html on your website.
  7. Done!

To-Do

  • SSL support via certbot
  • CSS it up ;D
  • Domain validation in form
  • redirect to homepage when action is completed