Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/makenova/nodeginx-cli

An nginx CLI helper.
https://github.com/makenova/nodeginx-cli

cli nginx nodejs

Last synced: 3 months ago
JSON representation

An nginx CLI helper.

Awesome Lists containing this project

README

        

# Nodeginx CLI

A interactive CLI helper for managing [Nginx](https://www.nginx.com) 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](https://www.npmjs.com) package, [Node.js](https://nodejs.org/en/)
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:

## License

Licensed under the MIT License: