Skip to content

Bash Script to easy create or delete apache virtual hosts on ubuntu

Notifications You must be signed in to change notification settings

petrfilip/apache-virtualhosts-manager

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 

Repository files navigation

Virtualhost Manage Script

Bash Script to allow create or delete apache virtual hosts on Ubuntu on a quick way.

This script also supports SSL, it means HTTPS is available.

Installation

  1. Download the script
  2. Edit variables in the script (such as target directory for ssl certificates)
  3. Apply permission to execute:
$ chmod +x /path/to/virtualhost.sh
  1. Optional: if you want to use the script globally, then you need to copy the file to your /usr/local/bin directory, is better if you copy it without the .sh extension:
$ sudo cp /path/to/virtualhost.sh /usr/local/bin/virtualhost

For Global Shortcut

$ cd /usr/local/bin
$ wget -O virtualhost https://raw.githubusercontent.com/petrfilip/virtualhost/master/virtualhost.sh
$ chmod +x virtualhost

Usage

Basic command line syntax:

$ sudo sh /path/to/virtualhost.sh [create | delete | list] [domain] 

With script installed on /usr/local/bin

$ sudo virtualhost [create | delete | list] [domain] 

Examples

to create a new virtual host:

$ sudo virtualhost create mysite.dev

to delete a virtual host

$ sudo virtualhost delete mysite.dev

About

Bash Script to easy create or delete apache virtual hosts on ubuntu

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%