{"id":13465084,"url":"https://github.com/schenkd/nginx-ui","last_synced_at":"2025-10-04T16:08:55.742Z","repository":{"id":37753125,"uuid":"268039885","full_name":"schenkd/nginx-ui","owner":"schenkd","description":"Nginx UI allows you to access and modify the nginx configurations files without cli. ","archived":false,"fork":false,"pushed_at":"2024-05-26T05:34:56.000Z","size":1953,"stargazers_count":4450,"open_issues_count":23,"forks_count":274,"subscribers_count":78,"default_branch":"master","last_synced_at":"2025-05-21T18:10:04.765Z","etag":null,"topics":["docker-compose","flask","nginx","nginx-configuration","nginx-docker","python","ui"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/schenkd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-30T08:31:03.000Z","updated_at":"2025-05-20T06:34:12.000Z","dependencies_parsed_at":"2024-07-31T14:08:10.517Z","dependency_job_id":"0e9e5021-d6da-491e-beac-be8844689730","html_url":"https://github.com/schenkd/nginx-ui","commit_stats":{"total_commits":13,"total_committers":4,"mean_commits":3.25,"dds":"0.46153846153846156","last_synced_commit":"8c12f54d381aa6dee6e8bd683036beaaddc96eca"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/schenkd/nginx-ui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schenkd%2Fnginx-ui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schenkd%2Fnginx-ui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schenkd%2Fnginx-ui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schenkd%2Fnginx-ui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schenkd","download_url":"https://codeload.github.com/schenkd/nginx-ui/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schenkd%2Fnginx-ui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278336376,"owners_count":25970308,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker-compose","flask","nginx","nginx-configuration","nginx-docker","python","ui"],"created_at":"2024-07-31T14:00:58.270Z","updated_at":"2025-10-04T16:08:55.695Z","avatar_url":"https://github.com/schenkd.png","language":"Python","funding_links":[],"categories":["Python","Security","Python (1887)","目录","flask"],"sub_categories":["WebServers"],"readme":"# nginx ui\n\n![Docker Image CI](https://github.com/schenkd/nginx-ui/workflows/Docker%20Image%20CI/badge.svg)\n\n![Image of Nginx UI](https://i.ibb.co/XXcfsDp/Bildschirmfoto-2020-06-20-um-18-40-27.png)\n\nTable of Contents\n\n- [nginx ui](#nginx-ui)\n  - [Introduction](#introduction)\n  - [Setup](#setup)\n    - [Example](#example)\n    - [Docker](#docker)\n  - [UI](#ui)\n  - [Authentication](#authentication)\n    - [Configure the auth file](#configure-the-auth-file)\n    - [Configure nginx](#configure-nginx)\n\n## Introduction\n\nWe use nginx in our company lab environment. It often happens that my\ncolleagues have developed an application that is now deployed in our Stage\nor Prod environment. To make this application accessible nginx has to be\nadapted. Most of the time my colleagues don't have the permission to access\nthe server and change the configuration files and since I don't feel like\ndoing this for everyone anymore I thought a UI could help us all. If you\nfeel the same way I wish you a lot of fun with the application and I am\nlooking forward to your feedback, change requests or even a star.\n\n## Setup\n\nContainerization is now state of the art and therefore the application is\ndelivered in a container.\n\n### Example\n\n- `-d` run as deamon in background\n- `--restart=always` restart on crash or server reboot\n- `--name nginxui` give the container a name\n- `-v /etc/nginx:/etc/nginx` map the hosts nginx directory into the container\n- `-p 8080:8080` map host port 8080 to docker container port 8080\n\n```bash\ndocker run -d --restart=always --name nginxui -v /etc/nginx:/etc/nginx -p 8080:8080 schenkd/nginx-ui:latest\n```\n\n### Docker\n\nRepository @ [DockerHub](https://hub.docker.com/r/schenkd/nginx-ui)\n\nDocker Compose excerpt\n\n```yaml\n# Docker Compose excerpt\nservices:\n  nginx-ui:\n    image: schenkd/nginx-ui:latest\n    ports:\n      - 8080:8080\n    volumes:\n      - nginx:/etc/nginx\n```\n\n## UI\n\n![Image of Nginx UI](https://i.ibb.co/qNgBRrt/Bildschirmfoto-2020-06-21-um-10-01-46.png)\n\nWith the menu item Main Config the Nginx specific configuration files\ncan be extracted and updated. These are dynamically read from the Nginx\ndirectory. If a file has been added manually, it is immediately integrated\ninto the Nginx UI Main Config menu item.\n\n![Image of Nginx UI](https://i.ibb.co/j85XKM6/Bildschirmfoto-2020-06-21-um-10-01-58.png)\n\nAdding a domain opens an exclusive editing window for the configuration\nfile. This can be applied, deleted and enabled/disabled.\n\n## Authentication\n\n[BasicAuth with nginx](https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/)\n\nIn general, this app does not come with authentication. However, it is easy to setup basic auth to restrict unwanted access.\nHere is how this can be done when using nginx.\n\n### Configure the auth file\n\n1. Verify that `apache2-utils` (Debian, Ubuntu) or `httpd-tools` (RHEL/CentOS/Oracle Linux) is installed\n2. Run the htpasswd utility to create a new user and set a passwort.\n    - Make sure, that the directory exists\n    - Remove the `-c` flag, if you have created a user before, since it creates the inital user/passwort file\n    - `sudo htpasswd -c /etc/apache2/.htpasswd user1`\n\n### Configure nginx\n\nThe following example adds basic auth to our nginxui app running in a docker container with a mapped port 8080.\nIn this case, it will be accessible via nginx.mydomain.com\n\n```none\nserver {\n    server_name nginx.mydomain.com;\n\n    location / {\n        proxy_pass http://127.0.0.1:8080/;\n    }\n\n    auth_basic \"nginxui secured\";\n    auth_basic_user_file /etc/apache2/.htpasswd;\n\n    # [...] ommited ssl configuration\n}\n```\n\n1. Add above nginx conf to your `/etc/nginx/my.conf` file\n2. Run `nginx -t` to make sure, that your config is valid\n3. Run `systemctl restart nginx` (or equivalent) to restart your nginx and apply the new settings\n4. Your nginx ui is now accessible at nginx.mydomain.com and will correctly prompt for basic auth\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschenkd%2Fnginx-ui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschenkd%2Fnginx-ui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschenkd%2Fnginx-ui/lists"}