{"id":13825368,"url":"https://github.com/dtan4/nginx-basic-auth-proxy","last_synced_at":"2025-04-16T08:43:39.399Z","repository":{"id":67729597,"uuid":"81440101","full_name":"dtan4/nginx-basic-auth-proxy","owner":"dtan4","description":" Docker image of Nginx Proxy with Basic Auth","archived":false,"fork":false,"pushed_at":"2020-09-25T13:45:08.000Z","size":14,"stargazers_count":89,"open_issues_count":2,"forks_count":62,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-22T15:49:59.794Z","etag":null,"topics":["nginx"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/dtan4.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}},"created_at":"2017-02-09T10:45:31.000Z","updated_at":"2025-03-14T17:03:55.000Z","dependencies_parsed_at":"2023-03-01T01:31:11.150Z","dependency_job_id":null,"html_url":"https://github.com/dtan4/nginx-basic-auth-proxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtan4%2Fnginx-basic-auth-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtan4%2Fnginx-basic-auth-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtan4%2Fnginx-basic-auth-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dtan4%2Fnginx-basic-auth-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dtan4","download_url":"https://codeload.github.com/dtan4/nginx-basic-auth-proxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249221604,"owners_count":21232432,"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","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":["nginx"],"created_at":"2024-08-04T09:01:19.659Z","updated_at":"2025-04-16T08:43:39.367Z","avatar_url":"https://github.com/dtan4.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# Docker image of Nginx Proxy with Basic Auth\n\n[![Docker Repository on Quay](https://quay.io/repository/dtan4/nginx-basic-auth-proxy/status \"Docker Repository on Quay\")](https://quay.io/repository/dtan4/nginx-basic-auth-proxy)\n\nSimple HTTP Proxy with Basic Authentication\n\n```\n       w/ user:pass   +------------------------+      +-------------+\nUser ---------------\u003e | nginx-basic-auth-proxy | ---\u003e | HTTP Server |\n                      +------------------------+      +-------------+\n```\n\n## Run\n\n```bash\n$ docker run \\\n    --rm \\\n    --name nginx-basic-auth-proxy \\\n    -p 8080:80 \\\n    -p 8090:8090 \\\n    -e BASIC_AUTH_USERNAME=username \\\n    -e BASIC_AUTH_PASSWORD=password \\\n    -e PROXY_PASS=https://www.google.com \\\n    -e SERVER_NAME=proxy.dtan4.net \\\n    -e PORT=80 \\\n    quay.io/dtan4/nginx-basic-auth-proxy\n```\n\nAccess to http://localhost:8080 , then browser asks you username and password.\n\nYou can also try complete HTTP-proxy example using Docker Compose.\nhello-world web application cannot be accessed without authentication.\n\n```bash\n$ docker-compose up\n# http://localhost:8080/\n# - Username: username\n# - Password: password\n```\n\n### Endpoint for monitoring\n\n`:8090/nginx_status` returns the metrics of Nginx.\n\n```sh-session\n$ curl localhost:8090/nginx_status\nActive connections: 1\nserver accepts handled requests\n 8 8 8\nReading: 0 Writing: 1 Waiting: 0\n```\n\n## Environment variables\n\n### Required\n\n|Key|Description|\n|---|---|\n|`BASIC_AUTH_USERNAME`|Basic auth username|\n|`BASIC_AUTH_PASSWORD`|Basic auth password|\n|`PROXY_PASS`|Proxy destination URL|\n\n### Optional\n\n|Key|Description|Default|\n|---|---|---|\n|`SERVER_NAME`|Value for `server_name` directive|`example.com`|\n|`PORT`|Value for `listen` directive|`80`|\n|`CLIENT_MAX_BODY_SIZE`|Value for `client_max_body_size` directive|`1m`|\n|`PROXY_READ_TIMEOUT`|Value for `proxy_read_timeout` directive|`60s`|\n|`WORKER_PROCESSES`|Value for `worker_processes` directive|`auto`|\n\n## Author\n\nDaisuke Fujita ([@dtan4](https://github.com/dtan4))\n\n## License\n\n[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdtan4%2Fnginx-basic-auth-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdtan4%2Fnginx-basic-auth-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdtan4%2Fnginx-basic-auth-proxy/lists"}