{"id":48920056,"url":"https://github.com/perezjnr/nginx-proxy-generator","last_synced_at":"2026-04-17T04:35:11.257Z","repository":{"id":306520110,"uuid":"1026463260","full_name":"perezjnr/nginx-proxy-generator","owner":"perezjnr","description":"Nginx Proxy Manager Script for Linux Admins","archived":false,"fork":false,"pushed_at":"2025-09-10T23:26:30.000Z","size":89,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-11T02:21:57.169Z","etag":null,"topics":["nginx-configuration","nginx-proxy","nginx-reverse-proxy","nginx-server"],"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/perezjnr.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-26T00:06:06.000Z","updated_at":"2025-09-10T23:19:22.000Z","dependencies_parsed_at":"2025-07-26T07:24:59.283Z","dependency_job_id":"ca754a2f-0f22-4272-88c0-b9a2e608982b","html_url":"https://github.com/perezjnr/nginx-proxy-generator","commit_stats":null,"previous_names":["peejaytec/nginx-proxy-generator","perezjnr/nginx-proxy-generator"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/perezjnr/nginx-proxy-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perezjnr%2Fnginx-proxy-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perezjnr%2Fnginx-proxy-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perezjnr%2Fnginx-proxy-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perezjnr%2Fnginx-proxy-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perezjnr","download_url":"https://codeload.github.com/perezjnr/nginx-proxy-generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perezjnr%2Fnginx-proxy-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31915435,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"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":["nginx-configuration","nginx-proxy","nginx-reverse-proxy","nginx-server"],"created_at":"2026-04-17T04:35:04.748Z","updated_at":"2026-04-17T04:35:11.238Z","avatar_url":"https://github.com/perezjnr.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nginx Proxy Generator Script\n\nA lightweight Bash script for generating Nginx reverse proxy configuration files without the overhead of full UI-based solutions.\n\nThis script was created to provide more **direct control over Nginx reverse proxy configuration**, especially for users who prefer or require CLI-driven workflows. While tools like **Nginx Proxy Manager** offer a great web interface, this script focuses on direct file manipulation and scripting flexibility. The long-term goal is to also offer a web interface that complements the CLI by writing and editing configuration files directly.\n\n---\n\n## 🚀 Features\n\n- Interactive menu-based or CLI usage\n- Create or remove Nginx proxy site configurations\n- Displays current Nginx version and directories\n- Performs syntax validation on config before enabling\n- Automatically restarts Nginx if changes are applied\n- Works well for self-hosted apps behind firewalls, DMZs, or internal networks\n\n---\n## ✅ Prerequisites\nThese neccessary application can be installed by the script if not installed already\n- Tested on **Ubuntu 24.04 LTS**, but compatible with other Debian-based systems.\n- **Nginx**.\n- **CertBot**\n- **Netcat**\n## 📥 Downloading the latest release\n   ```sh\n    wget https://github.com/perezjnr/nginx-proxy-generator/releases/latest/download/nginx-proxy-generator.tar.gz\n    tar -xzf nginx-proxy-generator.tar.gz \u0026\u0026 cd nginx-proxy-generator\n    sudo chmod +x main.sh\n   ```\nTo install Nginx Manually(script can auto install):\n\n```bash\nsudo apt update\nsudo apt install nginx\n```\n\n---\n## ⚙️ How It Works\n\n1. Checks if Nginx is installed.\n2. Confirms the existence of `/etc/nginx/sites-available` and `/etc/nginx/sites-enabled`.\n3. Prompts the user for required values:\n   - Port to listen on\n   - Domain name\n   - Internal IP address of web app\n4. Creates a configuration file in `sites-available`.\n5. Validates configuration using `nginx -t`.\n6. Enables the site by linking it to `sites-enabled`.\n7. Restarts Nginx and confirms success.\n\n\u003e **Note:** Existing files with the same name will be overwritten.\n\n---\n\n## 📘 Menu Interface\n\nRun the script without arguments to access the interactive menu:\n\n```bash\nsudo ./main.sh\n```\n\n### Menu Options\n\n| Option | Description                                  |\n|--------|----------------------------------------------|\n| 1      | Add a new website configuration              |\n| 2      | Remove an existing website configuration     |\n| 3      | Display usage information                    |\n| 4      | Display script information                   |\n| 5      | Display current Nginx version                |\n| 6      | Show Nginx `sites-available` directory path  |\n| 7      | Show Nginx `sites-enabled` directory path    |\n| 8      | Request new SSL certificate                  |\n| 9      | Exit                                          |\n\n---\n\n## 🖥️ CLI Options\n\nYou can run specific actions directly from the command line:\n\n```bash\nsudo ./main.sh [option]\n```\n\n### Supported Flags\n\n| Short Flag | Long Flag           | Description                                      |\n|------------|---------------------|--------------------------------------------------|\n| `-a`       | `--add`             | Add a new website configuration                  |\n| `-r`       | `--remove`          | Remove an existing website configuration         |\n| `-h`       | `--help`            | Display help/usage information                   |\n| `-i`       | `--info`            | Show detailed script information                 |\n| `-v`       | `--version`         | Display current installed Nginx version          |\n| `-s`       | `--sites-available` | Show `sites-available` directory path            |\n| '-c'       | '--certbot'         | Request new SSL certificate                      |\n| `-e`       | `--sites-enabled`   | Show `sites-enabled` directory path              |\n\n\u003e Example:\n\u003e ```bash\n\u003e sudo ./main.sh --add\n\u003e ```\n\n---\n\n## 📌 Example Use Case\n\nYou're running a self-hosted app on `192.168.1.100:5000` and want to serve it externally at `http://app.example.com`.\n\n### What you want:\n\n- External visitors reach `app.example.com`\n- Internally it goes to `192.168.1.100:5000`\n- Proxy should listen on default HTTP port (80)\n\n### What to do:\n\n```bash\nsudo ./main.sh --add\n```\n\nThen when prompted, enter:\n\n- **Listen Port**: `80`\n- **Domain Name**: `app.example.com`\n- **Internal IP**: `192.168.1.100`\n- **Internal Port**: `5000`\n\nThis will:\n\n- Generate a reverse proxy config\n- Link it to `sites-enabled`\n- Confirm if you want SSL cert and it will automatically request for **Lets Encrypt** certificate using certbot \n- Reload Nginx\n\nYou're now live with a fully functional reverse proxy.\n\n---\n\n## 🎯 Future Plans\n\nFeatures that may be added soon:\n\n```txt\n- Web interface (optional) to accompany CLI tool\n- Improve SSL support for existing http sites\n- Backup/restore of existing configurations\n- Access logging, better validation and conflict checks\n- Modular plugin-like add-ons (e.g., rate limiting, headers, etc.)\n```\n\n---\n\n## 🧑‍💻 Contributing\n\nPull requests and suggestions are welcome! Feel free to fork this repo and propose new features or improvements.\n\n---\n\n## 📄 License\n\nMIT\n\n---\n\n## 🙏 Acknowledgements\n\nInspired by Nginx Proxy Manager and the need for low-footprint CLI-based tools in self-hosted environments.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperezjnr%2Fnginx-proxy-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperezjnr%2Fnginx-proxy-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperezjnr%2Fnginx-proxy-generator/lists"}