Skip to main content

A package to create configurations for nginx for different web applications

Project description

Nginx-set-conf

====================================================================================
This is a simple python library that helps you to create configurations for different docker based applications with nginx as reverse proxy.

Installation

Nginx-set-conf requires

  • Python (>= 3.8)
  • click (>= 8.1.3)
  • PyYaml (>= 5.4.1)

Use the package manager pip to install nginx-set-conf.

pip install nginx-set-conf-equitania

Usage

$ nginx-set-conf --help
usage: nginx-set-conf [--help] [--config_template] [--ip] [--domain] [--port] [--cert_name] [--pollport] [--redirect_domain] [--auth_file] [--config_path]
Options:
  --config_template TEXT  Insert the conf-template.  
  
                          We support:

                          - ngx_code_server (code-server with ssl)
                          - ngx_fast_report (FastReport with ssl)
                          - ngx_mailhog (MailHog with ssl)
                          - ngx_nextcloud (NextCloud with ssl)
                          - ngx_odoo_http (Odoo only http)
                          - ngx_odoo_ssl (Odoo with ssl)
                          - ngx_pgadmin (pgAdmin4 with ssl)
                          - ngx_portainer (NextCloud with ssl)
                          - ngx_pwa (Progressive Web App with ssl)
                          - ngx_redirect (Redirect Domain without ssl)
                          - ngx_redirect_ssl (Redirect Domain with ssl)
  --ip TEXT               IP address of the server
  --domain TEXT           Name of the domain
  --port TEXT             Primary port for the Docker container
  --cert_name TEXT        Name of certificate if you want to use letsencrypt - complete path for self signed or purchased certificates
  --cert_key TEXT         Name and path of certificate key - for self signed or purchased certificates - leave empty for letsencrypt
  --pollport TEXT         Secondary Docker container port for odoo pollings
  --redirect_domain TEXT  Redirect domain
  --auth_file TEXT        Use authfile for htAccess 
  --config_path TEXT      Yaml configuration folder
  --help                  Show this message and exit.

Example

# Execution with config file
nginx-set-conf --config_path server_config

f.e.

nginx-set-conf --config_path=$HOME/docker-builds/ngx-conf

Execution without config file

nginx-set-conf --config_template ngx_odoo_ssl --ip 1.2.3.4 --domain www.equitania.de --port 8069 --cert_name www.equitania.de --pollport 8072

Create your cert

certbot certonly --standalone --agree-tos --register-unsafely-without-email -d www.equitania.de

Install certbot on Debian/Ubuntu with

apt-get install certbot

Create your auth file

Install htpasswd on Debian/Ubuntu with

apt-get install apache2-utils
htpasswd -c /etc/nginx/.htaccess/.htpasswd-user USER

nginx template settings

You can download our settings: nginx.conf
and the : nginxconfig.io.zip
based on https://www.digitalocean.com/community/tools/nginx

This project is licensed under the terms of the AGPLv3 license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nginx-set-conf-equitania-1.0.6.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

nginx_set_conf_equitania-1.0.6-py3-none-any.whl (21.7 kB view details)

Uploaded Python 3

File details

Details for the file nginx-set-conf-equitania-1.0.6.tar.gz.

File metadata

File hashes

Hashes for nginx-set-conf-equitania-1.0.6.tar.gz
Algorithm Hash digest
SHA256 519152ce9b6c39a7dd632cd1ad1e349bbc4afe38f557439d7f6eb27f76911f8c
MD5 f93ba64f9a0cbd69fbd470d32ce58677
BLAKE2b-256 b00e5ba89ecb74d3245260e848c10e7bbcb8ac151c9439d7f88c723b9cef2235

See more details on using hashes here.

File details

Details for the file nginx_set_conf_equitania-1.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for nginx_set_conf_equitania-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 6eaea695fbc6ca59162b4f5cdd5fa8036fd4d1306360e13ffedd74dd22b2b77a
MD5 cffc147316d2502f65417eb19c49ea97
BLAKE2b-256 9679ab9e99b7ff456024e13bdb5254829028dccdff10d691c13fc45f77c00ce6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page