NPG is a small tool written in bash that help you easily generate and manage web projects that use NGINX.
Download npg.sh anywhere you want
wget https://raw.githubusercontent.com/nicolasbeauvais/npg/master/npg.sh
Modify the script accordingly:
# You nginx vhost directory
NGINX_VHOSTS_DIR="/etc/nginx/sites-available"
# You working directory
WORKING_DIR="/your/work/directory"
# The command to restart nginxa
RESTART_NGINX="service nginx restart"
# Username to use when creating directories
USERNAME="yourusername"
# PHP version
PHP_VERSION="7.1"
# Default TLD to use
TLD="localhost"
Create a symlink:
ln -s npg.sh /usr/bin/npg
npg --help # list all available commands