A simple bash script for Linux (debian-based distro) to create or delete a virtual host from command line interface.
Supports: SSL certificate self-signed (mkcert), PHP-fpm (optional), Mysql database (optional).
Note: This script is only for local development. For production server, Apache requires some security improvements.
- A debian-based distro like Ubuntu
- Stack Lamp: Apache, PHP, Mysql (optional), PHP-fpm (optional)
- download this script
- open your CLI and type:
sudo mv lamp_virtual_host /usr/local/bin sudo chmod +x /usr/local/bin/lamp_virtual_host
cd /path/to/directory/websites/ lamp_virtual_host www.example.local/
and follow instructions.