Skip to content

Creates a new virtual host with a simple command line program

Notifications You must be signed in to change notification settings

jnaO/bash--virtual-host

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 

Repository files navigation

INSTALLATION

  • Clone repo to a folder of your discretion.
  • Create a symlink to the c-vhost.sh file into a folder on your path (run echo $PATH in terminal to find out what folders you have in your path).

ln -s PATH/TO/YOUR/CLONE_FOLDER/c-vhost.sh PATH_FOLDER/create_virtual_host

Modify your apache server /etc/apache2/httpd.conf, uncomment the line Include /private/etc/apache2/extra/httpd-vhosts.conf (close to the end of the file).

USAGE

Program needs to be run as root (sudo)

create_virtual_host can use one or two argument(s) passed into the program.

The first argument is required and should be the name of your new virtual host.

sudo create_virtual_host myawesomesite

The second is optional and is the path to where you would like to point your virtual host. If no second argument is given, the current working directory is used as path to where the virtual host is pointed.

sudo create_virtual_host myawesomesite ../rootfolder

Visit http://myawesomesite in your favourite browser to view your awesome site

To view current list of virtual hosts pass in the flag -l (sudo not needed)

create_virtual_host -l

About

Creates a new virtual host with a simple command line program

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages