Socket
Socket
Sign inDemoInstall

nginx-agent

Package Overview
Dependencies
101
Maintainers
4
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    nginx-agent

Manage multi-tenant Nginx configuration


Version published
Maintainers
4
Install size
2.89 MB
Created

Readme

Source

Nginx Management Agent

Tiny RESTful web server for dynamically managing Nginx configuration for multi-tenant systems.

It is designed to run inside your trusted infrastructure (e.g. binds to 127.0.0.1 or intranet), so no security is implemented.

In order to be able to reload nginx dynamically Nginx Agent should be run with sudo.

Installation

  1. Install from npm:

    npm install -g nginx-agent
    
  2. Create a directory for managing your Nginx tenants:

    mkdir -p /etc/nginx/conf/myapp
    
  3. Run Nginx Agent there:

    nginx-agent
    
  4. Hook up tenants configuration into your main nginx.conf:

    include myapp/*.conf;
    

Tenants configurations submitted via API will be stored in <root>/<tenantId>.conf.

REST API

GET /

List all known tenants.

POST /:id

Creates or updates tenant with specified id. Accepts JSON body with Nginx configuration as plain text.

GET /:id

Returns Nginx configuration for specified tenant.

DELETE /:id

Deletes tenant configuration.

Options

By default Nginx Agent starts with following options:

{
  "port": 7390,
  "ip": "127.0.0.1",
  "password": null // no password required
}

It is advised that you create nginx-agent.json in working directory and specify required parameters there.

SSL support coming soon

Keywords

FAQs

Last updated on 23 Jun 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc