A shell script for easy virtual host management of your local development environment. Bundled with mkcert for automatic SSL certificate generation for local https sites.
All the conf files generated by this script are prefixed with vmgr-. This ensures that all conf files generated by vmgr will not
conflict with existing files, and that vmgr will only process it's own generated files and not touch anything else.
Simply clone this repo and run vmgr-install.sh.
git clone https://github.com/mikeroq/vmgr.git && cd vmgr
./vmgr-install.shThe install script will copy the files from the repo to /etc/vmgr. vmgr will be symlinked to your user bin so you can run it from anywhere. Additionally mkcert will be called to install it's root CA for SSL cert generation.
vmgr create myawesomesiteThis will produce the following:
- A project directory created at ~/projects/myawesomesite
- SSL certificate generated in ~/ssl_certificates
- Virtual host vmgr-myawesomesite.vmgr.conf generated in /etc/apache2/sites-available
- myawesomesite.vmgr added to your /etc/hosts pointing to 127.0.0.1
- Virtual host will be enabled & apache restarted
Then you can browse to https://myawesomesite.vmgr
The following commands are available:
- vmgr create
- vmgr remove
- vmgr disable
- vmgr enable
- vmgr list
Heavly inspired by/converted from
- vhost-manager by Rubens Fernandes
Utilizing
- mkcert by Filippo Valsorda
- prettytable.sh by Jakob Westhoff
- getoptions by Koichi Nakashima