# 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](https://pip.pypa.io/en/stable/) to install nginx-set-conf.
```bash
pip install nginx-set-conf
```
---
## Usage
```bash
$ nginx-set-conf --help
usage: nginx-set-conf [--help] [--config_template] [--ip] [--domain] [--port] [--cert_name] [--pollport] [--redirect_domain] [--auth_file] [--config_path]
```
```bash
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
```bash
# Execution with config file
nginx-set-conf --config_path server_config
```
f.e.
```bash
nginx-set-conf --config_path=$HOME/docker-builds/ngx-conf
```
### Execution without config file
```bash
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
```bash
certbot certonly --standalone --agree-tos --register-unsafely-without-email -d www.equitania.de
```
### Install certbot on Debian/Ubuntu with
```bash
apt-get install certbot
```
### Create your auth file
#### Install htpasswd on Debian/Ubuntu with
```bash
apt-get install apache2-utils
htpasswd -c /etc/nginx/.htaccess/.htpasswd-user USER
```
## nginx template settings
You can download our settings: [nginx.conf](https://rm.ownerp.io/staff/nginx.conf)
and the : [nginxconfig.io.zip](https://rm.ownerp.io/staff/nginxconfig.io.zip)
based on [https://www.digitalocean.com/community/tools/nginx](https://www.digitalocean.com/community/tools/nginx)
This project is licensed under the terms of the **AGPLv3** license.
Raw data
{
"_id": null,
"home_page": "https://github.com/equitania/nginx-set-conf",
"name": "nginx-set-conf",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "nginx, configuration, docker, reverse-proxy",
"author": "Equitania Software GmbH",
"author_email": "info@equitania.de",
"download_url": "https://files.pythonhosted.org/packages/a0/60/f4fe79a8e35adea5347c7209e330222db940035d466d5e2ec40dc5ee558a/nginx_set_conf-1.1.5.tar.gz",
"platform": null,
"description": "# Nginx-set-conf\n\n==================================================================================== \nThis is a simple python library that helps you to create configurations for different docker based applications with nginx as reverse proxy. \n \n## Installation\n \n### Nginx-set-conf requires\n \n- Python (>= 3.8) \n- click (>= 8.1.3) \n- PyYaml (>= 5.4.1) \n \nUse the package manager [pip](https://pip.pypa.io/en/stable/) to install nginx-set-conf.\n \n```bash\npip install nginx-set-conf\n```\n\n---\n\n## Usage\n\n```bash\n$ nginx-set-conf --help\nusage: nginx-set-conf [--help] [--config_template] [--ip] [--domain] [--port] [--cert_name] [--pollport] [--redirect_domain] [--auth_file] [--config_path]\n```\n\n```bash\nOptions:\n --config_template TEXT Insert the conf-template. \n \n We support:\n - ngx_code_server (code-server with ssl)\n - ngx_fast_report (FastReport with ssl)\n - ngx_mailhog (MailHog with ssl)\n - ngx_nextcloud (NextCloud with ssl)\n - ngx_odoo_http (Odoo only http)\n - ngx_odoo_ssl (Odoo with ssl)\n - ngx_pgadmin (pgAdmin4 with ssl)\n - ngx_portainer (NextCloud with ssl)\n - ngx_pwa (Progressive Web App with ssl)\n - ngx_redirect (Redirect Domain without ssl)\n - ngx_redirect_ssl (Redirect Domain with ssl)\n --ip TEXT IP address of the server\n --domain TEXT Name of the domain\n --port TEXT Primary port for the Docker container\n --cert_name TEXT Name of certificate if you want to use letsencrypt - complete path for self signed or purchased certificates\n --cert_key TEXT Name and path of certificate key - for self signed or purchased certificates - leave empty for letsencrypt\n --pollport TEXT Secondary Docker container port for odoo pollings\n --redirect_domain TEXT Redirect domain\n --auth_file TEXT Use authfile for htAccess \n --config_path TEXT Yaml configuration folder\n --help Show this message and exit.\n```\n\n---\n\n## Example\n\n```bash\n# Execution with config file\nnginx-set-conf --config_path server_config\n```\n\nf.e.\n\n```bash\nnginx-set-conf --config_path=$HOME/docker-builds/ngx-conf\n``` \n\n### Execution without config file\n\n```bash\nnginx-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\n```\n\n\n### Create your cert\n\n```bash\ncertbot certonly --standalone --agree-tos --register-unsafely-without-email -d www.equitania.de\n```\n\n### Install certbot on Debian/Ubuntu with\n\n```bash\napt-get install certbot\n```\n\n### Create your auth file\n\n#### Install htpasswd on Debian/Ubuntu with\n\n```bash\napt-get install apache2-utils\nhtpasswd -c /etc/nginx/.htaccess/.htpasswd-user USER\n``` \n\n## nginx template settings \n \nYou can download our settings: [nginx.conf](https://rm.ownerp.io/staff/nginx.conf) \nand the : [nginxconfig.io.zip](https://rm.ownerp.io/staff/nginxconfig.io.zip) \nbased on [https://www.digitalocean.com/community/tools/nginx](https://www.digitalocean.com/community/tools/nginx) \n \nThis project is licensed under the terms of the **AGPLv3** license. \n",
"bugtrack_url": null,
"license": null,
"summary": "Ein Werkzeug zur Verwaltung von Nginx-Konfigurationen",
"version": "1.1.5",
"project_urls": {
"Homepage": "https://github.com/equitania/nginx-set-conf"
},
"split_keywords": [
"nginx",
" configuration",
" docker",
" reverse-proxy"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5a034d6c27b0207d77ed9627672957ff5ad791f4d023b821a64191de62d17f0a",
"md5": "b08617f3b0c1d9b9c5f0701af4a8527a",
"sha256": "70ca35889d3e02a00de1f6701430a89561daf10e14c6e7581b096c9a1036da51"
},
"downloads": -1,
"filename": "nginx_set_conf-1.1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b08617f3b0c1d9b9c5f0701af4a8527a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 23230,
"upload_time": "2024-12-12T18:23:12",
"upload_time_iso_8601": "2024-12-12T18:23:12.882060Z",
"url": "https://files.pythonhosted.org/packages/5a/03/4d6c27b0207d77ed9627672957ff5ad791f4d023b821a64191de62d17f0a/nginx_set_conf-1.1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a060f4fe79a8e35adea5347c7209e330222db940035d466d5e2ec40dc5ee558a",
"md5": "4cc3e70acc75e1aca5117519c46ae93d",
"sha256": "055776c9e6d1b0e83f9e7e0684be659a2aa2766c5826d0535219de8cb0b5fa1a"
},
"downloads": -1,
"filename": "nginx_set_conf-1.1.5.tar.gz",
"has_sig": false,
"md5_digest": "4cc3e70acc75e1aca5117519c46ae93d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 23025,
"upload_time": "2024-12-12T18:23:16",
"upload_time_iso_8601": "2024-12-12T18:23:16.990161Z",
"url": "https://files.pythonhosted.org/packages/a0/60/f4fe79a8e35adea5347c7209e330222db940035d466d5e2ec40dc5ee558a/nginx_set_conf-1.1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-12 18:23:16",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "equitania",
"github_project": "nginx-set-conf",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "nginx-set-conf"
}