GithubHelp home page GithubHelp logo

iruwl / virtualhost Goto Github PK

View Code? Open in Web Editor NEW

This project forked from roverwire/virtualhost

0.0 1.0 0.0 49 KB

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

Shell 100.00%

virtualhost's Introduction

Virtualhost Manage Script

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

Installation

  1. Download the script
  2. 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/RoverWire/virtualhost/master/virtualhost.sh
$ chmod +x virtualhost
$ wget -O virtualhost-nginx https://raw.githubusercontent.com/RoverWire/virtualhost/master/virtualhost-nginx.sh
$ chmod +x virtualhost-nginx

Usage

Basic command line syntax:

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

With script installed on /usr/local/bin

$ sudo virtualhost [create | delete] [domain] [optional host_dir]

Examples

to create a new virtual host:

$ sudo virtualhost create mysite.dev

to create a new virtual host with custom directory name:

$ sudo virtualhost create anothersite.dev my_dir

to delete a virtual host

$ sudo virtualhost delete mysite.dev

to delete a virtual host with custom directory name:

$ sudo virtualhost delete anothersite.dev my_dir

Localization

For Apache:

$ sudo cp /path/to/locale/<language>/virtualhost.mo /usr/share/locale/<language>/LC_MESSAGES/

For NGINX:

$ sudo cp /path/to/locale/<language>/virtualhost-nginx.mo /usr/share/locale/<language>/LC_MESSAGES/

virtualhost's People

Contributors

roverwire avatar jacobdb avatar cpswsg avatar antleblanc avatar abedham avatar guille21 avatar jonscottclark avatar manseka avatar rafamalaga86 avatar nzesalem avatar mavisland avatar vinicius73 avatar hwaien avatar igormukhingmailcom avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.