A interactive CLI helper for managing Nginx virtual
host configs and the nginx
process. This assumes you are using the
sites-available and sites-enabled setup, where those directories are arranged as
so,
/etc
|-- nginx
|-- nginx.config
|-- sites-enabled
| +-- site-two
+-- sites-available
|-- site-one
+-- site-two
server blocks are setup in the sites-available directory and are "turned on" by creating a symbolic link to the sites-enabled directory. In the example above, site-one and site-two are setup but only site-two is served by nginx.
This is an NPM package, Node.js is a prerequisite.
$ npm install -g nodeginx-cli
Type nodeginx
on the command line, your sites should be listed, and you
will be prompted. The nginx config files are usually in a directory that
requires root permission. You may be prompted for you password if your user is
not set up for pasword-less sudo (not tested).
makenova@gia:~$ nodeginx
site-one (disabled)
site-two (enabled)
? What would you like to do? (Use arrow keys)
❯ enable/disable a site
add a site
remove a site
start/stop/restart nginx
exit
Please report any bugs to: https://github.com/makenova/nodeginx-cli/issues
Licensed under the MIT License: https://opensource.org/licenses/MIT