Giter Club home page Giter Club logo

apache-add-site's Introduction

UBUNTU/Apache2 SITE MANAGER

create locals domains on the fly

Author: M.Goldenbaum | Webklex 
Website: http://webklex.com 
License: MIT
Version: 1.0.0 alpha

Description: This script is designed to setup any local 
development website witch one easy command. 
It creates if it doesn't exists an apache2 site config
file, does the required hosts entry, adds the site to 
the apache configuration (a2ensite) and reloads the 
whole configuration. So you can get started within
seconds.

Example for creating the local domain example.dev:
site-manager -d dev -n example -p /var/www/dev/example -l 

Getting Help: 
There are actually multiple ways to get help if you are 
stuck or have any questions. You can either visit the 
official Github site: https://github.com/Webklex/apache-add-site or contact me
by sending an email to: [email protected]

Available options:

-h
    Display the help page. Actually your seeing it right now.
-d
    Set the domain which should be used.
    Default: dev
-n
    Set the new domain name. E.g. example if you which to create a domain like example.dev
    Default: example
-p
    Set the domain root folder.
    Default: /var/www/dev/[YOUR CHOSEN DOMAIN NAME]/public
-a
    Set the apache site configuration path
    Default: /etc/apache2/sites-available
-f
    Set the hosts file location
    Default: /etc/hosts
-o
    Set the localhost ip
    Default: 127.0.0.1
-l
    Sometimes you need to disable the lock - if so use -l to force what ever you want
    Usage: -l
    
Example usage:
site-manager -d dev -n example -p /var/www/dev/example -l

Installation & Setup

sudo cp site-manager.sh /usr/local/bin/site-manager

or

sudo ln -s site-manager.sh /usr/local/bin/site-manager

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.