Niraj010 / site-manager

Setup and manage nginx and php websites

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Site Manager

Setup easy and fast nginx and php for a website

Installation

The installer is going to setup latest stable versions of nginx and php

git clone https://github.com/ivandokov/site-manager.git
cd site-manager
./install

If you want to install xdebug you can run:

./install-xdebug

Usage

Creates system user, website root, logs and webroot directories, nginx and php-fpm configurations

site-manager create [domain.tld] [min-fpm-workers: number] [max-fpm-workers: number] [display-errors: on|off]

Deletes nginx and php-fpm configurations and optionally deletes the system user and website files

site-manager delete [domain.tld]

Enables nginx virtual host and php-fpm workers

site-manager enable [domain.tld]

Disables nginx virtual host and php-fpm workers

site-manager disable [domain.tld]

Configuration

If you want to change the default behavior you can create a configuration file at /etc/site_manager or ~/.site_manager. The configuration from your home directory takes priority.

Available configuration variables

# Location where all sites will be created
SITES_DIR=/var/www

# Location of the web root
# Full website path is ${SITES_DIR}/${DOMAIN}/${PUBLIC_DIR}
PUBLIC_DIR=public

# Default max php-fpm workers used when not specified
FPM_MAX_WORKERS=5

# Default min php-fpm workers used
FPM_MIN_WORKERS=1

# Control error displaying: on|off
FPM_DISPLAY_ERRORS=on

# Logs location
LOGS_DIR=/var/log/www

About

Setup and manage nginx and php websites

License:MIT License


Languages

Language:Shell 100.0%