GithubHelp home page GithubHelp logo

enyosolutions / nginx-vhost-admin Goto Github PK

View Code? Open in Web Editor NEW
12.0 1.0 1.0 6.15 MB

License: MIT License

JavaScript 55.32% Less 0.06% EJS 22.61% CSS 22.01% Shell 0.01%
nginx-editor nginx reverse-proxy virtual-hosts virtual

nginx-vhost-admin's Introduction

Nginx virtual host and proxy admin

Nginx server admin is a simple application to help you create and edit virtual hosts on your nginx installation.

Deploy it on all your servers and use it to administrate data. It supports proxy, Html, and Php templates.

If you need more templates please open an issue or better yet create pull request with your desired template.

nginx editor

why

Even if there are other options out there, most of them require some complicated install, a database or a docker. I wanted something that could integrate into and existing install, or deploy on a new server without too much work.

  • no database : data is read directly from nginx config.
  • no need modifying your config files
  • no docker, so no need encapsulating your docker into a container.

Installation

  • git clone --depth 1 https://github.com/enyosolutions-team/nginx-vhost-admin.git
  • cd nginx-vhost-admin
  • npm install
  • node app.js

You can and should put the behind a node process manager, like pm2.

Security

ip whitelisting

By default the access to the virtual hosts is restricted to the local ip address. In order for your app to be accessible on the outside, you need add the whitelisted ip addresses that you'd like to whitelist. This can be done in config/local.js.

  disableIpFiltering: false,
  whitelistedIps: ['127.0.0.1', '::1'],

If you don't need this feature you can disable it by setting disableIpFiltering to true. An example use case if to allow connecting only from work for example.

user accounts

You can use http authentification to protect your app. By default it's enabled and there is a user you can use to connect

 {
   security: {
     ...
      users: {
       admin: 'nginxAdminHost987654321',
       user2: 'nginxAdminHost987654321',
      },
      ...
  },

You can add more users and change passwords.

⚠️ You should change the default password to something else.

To disable this feature simply set users: false instead of the list of users in your local.js.

Installation

  • Pull the code
  • run npm installor yarn
  • edit the config in config/local.js add all the ips you need to whitelist. This application has a strict whitelisting policy in order to reduce attack surface to hackers.
  • define a Unique AUTH key for your frontend to be able to access the api. authKey
  • (Optional) define the servers that you want preconfigured (devops.server section)

demo

nginx editor nginx editor nginx editor

Coded with ❤️ by Enyosolutions with theme SB ADMIN 2

nginx-vhost-admin's People

Contributors

fbatiga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

torns

nginx-vhost-admin's Issues

Use with a webserver

Good solution. I have installed it, made a own local.js and started up.
However I get the following errors:

  • Restart button nginx: {"errors"[error_no_authorisation_header_for_agent"],"message":"error_no_authorisation_wrong_format_for_agent"}
  • Selecting Dashboard: Error_no_autorisation_wrong_format_for_agent

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.