Skip to content

Latest commit

 

History

History
44 lines (25 loc) · 931 Bytes

README.md

File metadata and controls

44 lines (25 loc) · 931 Bytes

Vhost

Shell script to manage vhosts a local server for testing.

##Installation

sudo git clone https://github.com/sk8sta13/Vhost
sudo cp ./Vhost/vhost.sh /usr/bin/vhost
sudo chmod +x /usr/bin/vhost

##Use

Displaying help

su vhost -help

Displays a list of vhosts created in test server.

su vhost -list

Creates a vhost "site.local" pointing to "/var/www/site.local", if the "site.local" directory does not exist, it is created.

su vhost -create site.local

Creates a vhost "test.local" pointing to "/var/www/tests", if the directory "tests" does not exist it is created.

su vhost -create test.local /var/www/tests

Disable vhost "site.local"

su vhost -disable site.local

Enables vhost "site.local"

su vhost -enable site.local

Disable vhost "test.local" and exclude the directory "/var/www/tests"

su vhost -delete site.local

##Comments

Tests were done in a vm with ubuntu server 14 with Apache.