Giter Site home page Giter Site logo

nginx-generator's Introduction

nginx-generator

Upload Python Package

Features

  • Reverse proxy support
  • Static file support
  • PHP support
  • Certbot support
  • Syntax checking

Description

nginx-generator is a command-line program for generating nginx config files. It requires python 3.7+. nginx-generator can generate nginx-config files, aquire ssl certificates using certbot, enable php and much more. It is tested on Ubutnu server 20.04

nginx-generator [OPTIONS] DOMAIN

Options

  -p, --proxy TEXT       Proxy address
  -r, --root PATH        Document root
  --php                  Enables php-fpm
  --php-version TEXT     Set php-fpm version
  --filename TEXT        Set config filename (default: domain)
  --no-ssl               Disables automatic certificate using certbot
  --edit                 Open editor after install
  -y, --yes              Do not prompt user
  --dry-run              Writes to temporary file (implies --edit, --no-ssl)
  --ignore-nginx-errors  Don't exit on nginx errors
  --help                 Show this message and exit.

Examples

Serve a static site on example.com and www.example.com with the static files located at /var/www/html, you will get an SSL certificate automatically.

sudo nginx-generator example.com,www.example.com --root /var/www/html

Proxy a backend on http://localhost:8080

sudo nginx-generator example.com,www.example.com --proxy http://localhost:8080/

Serve a php website with php8.0

sudo nginx-generator example.com --root /var/www/html --php --php-version 8.0

Don't get SSL and open an editor after file creation

sudo nginx-generator example.com --no-ssl --edit

Installation

nginx-generator can be installed using pip

sudo pip3 install nginx-generator

Requirements

The script is based on python, and is avaliable on PyPI

Optional

  • certbot (for autoamtic SSL certificates)
  • php with php-fpm (for php support)

Roadmap

  • Add common service configs
  • Transition to a jinja master template

nginx-generator's People

Contributors

oliwerix avatar

Stargazers

condor avatar ripsnort ntear avatar

Watchers

 avatar ripsnort ntear avatar

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.