makenova / nodeginx-cli

An nginx CLI helper.

Home Page:https://www.npmjs.com/package/nodeginx-cli

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nodeginx CLI

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.

Installation

This is an NPM package, Node.js is a prerequisite.

$ npm install -g nodeginx-cli

Use

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

Bugs

Please report any bugs to: https://github.com/makenova/nodeginx-cli/issues

License

Licensed under the MIT License: https://opensource.org/licenses/MIT

About

An nginx CLI helper.

https://www.npmjs.com/package/nodeginx-cli

License:MIT License


Languages

Language:JavaScript 100.0%