Create this script /usr/bin/nginx_modsite and make it executable.
How it works? To list all the sites $ sudo nginx_modsite -l
To enable site "test_website" $ sudo nginx_modsite -e test_website
To disable site "test_website"
| #!/bin/bash | |
| # | |
| # [Quick LEMP Stack Installation Script] | |
| # | |
| # GitLab: https://gitlab.com/devops212/lempqc | |
| # Modief by wiros4bleng | |
| # | |
| bold=$(tput bold) | |
| normal=$(tput sgr0) | |
| cat <<! |
| ~ $ gem install jekyll bundler | |
| ~ $ jekyll new projek-jekyll-pertamaku | |
| ~ $ cd projek-jekyll-pertamaku | |
| ~/projek-jekyll-pertamaku $ bundle exec jekyll serve |
| add-apt-repository ppa:git-core/ppa | |
| apt update | |
| apt-get install git |
Create this script /usr/bin/nginx_modsite and make it executable.
How it works? To list all the sites $ sudo nginx_modsite -l
To enable site "test_website" $ sudo nginx_modsite -e test_website
To disable site "test_website"
| ## | |
| # You should look at the following URL's in order to grasp a solid understanding | |
| # of Nginx configuration files in order to fully unleash the power of Nginx. | |
| # http://wiki.nginx.org/Pitfalls | |
| # http://wiki.nginx.org/QuickStart | |
| # http://wiki.nginx.org/Configuration | |
| # | |
| # Generally, you will want to move this file somewhere, and start with a clean | |
| # file but keep this around for reference. Or just disable in sites-enabled. | |
| # |
| user www-data www-data; | |
| worker_processes 6; | |
| pid /run/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| # multi_accept on; | |
| } | |
| http { |