{"id":28089208,"url":"https://github.com/cynegeirus/nginx","last_synced_at":"2026-03-04T02:31:51.552Z","repository":{"id":289445768,"uuid":"971277992","full_name":"cynegeirus/nginx","owner":"cynegeirus","description":"This repository contains a highly optimized NGINX configuration for handling high volumes of concurrent traffic with performance and security in mind. The setup is ideal for web applications, reverse proxies, and services requiring low latency, efficient resource usage, and structured logging.","archived":false,"fork":false,"pushed_at":"2025-04-23T09:32:13.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-13T13:55:40.603Z","etag":null,"topics":["nginx","nginx-configuration","nginx-module","nginx-proxy","nginx-reverse-proxy","nginx-server","performance","performance-optimization","performance-tuning"],"latest_commit_sha":null,"homepage":"","language":null,"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/cynegeirus.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}},"created_at":"2025-04-23T09:25:10.000Z","updated_at":"2025-04-23T09:34:28.000Z","dependencies_parsed_at":"2025-04-23T10:43:10.730Z","dependency_job_id":null,"html_url":"https://github.com/cynegeirus/nginx","commit_stats":null,"previous_names":["cynegeirus/nginx"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cynegeirus/nginx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cynegeirus%2Fnginx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cynegeirus%2Fnginx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cynegeirus%2Fnginx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cynegeirus%2Fnginx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cynegeirus","download_url":"https://codeload.github.com/cynegeirus/nginx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cynegeirus%2Fnginx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30070080,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T01:03:42.280Z","status":"online","status_checked_at":"2026-03-04T02:00:07.464Z","response_time":59,"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","nginx-configuration","nginx-module","nginx-proxy","nginx-reverse-proxy","nginx-server","performance","performance-optimization","performance-tuning"],"created_at":"2025-05-13T12:54:52.771Z","updated_at":"2026-03-04T02:31:51.514Z","avatar_url":"https://github.com/cynegeirus.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# High-Performance NGINX Configuration for Heavy Traffic\n\nThis repository contains a highly optimized NGINX configuration for handling high volumes of concurrent traffic with performance and security in mind. The setup is ideal for web applications, reverse proxies, and services requiring low latency, efficient resource usage, and structured logging.\n\n## 💡 Key Features\n\n- **Multi-worker support** for CPU scaling\n- **High connection and file limits** to handle thousands of concurrent clients\n- **File cache optimizations** for faster static content delivery\n- **Custom JSON logging** for integration with modern log analysis systems (e.g., Graylog, ELK)\n- **Advanced GZIP compression** with a wide range of MIME types\n- **SSL support** including TLS 1.3\n- **Keep-alive optimizations** for long-lived client connections\n- **Tuned upstream proxy settings** for backend resilience and performance\n\n---\n\n## 📂 Included Files\n\n| File | Description |\n|------|-------------|\n| `nginx.conf` | Main NGINX configuration file with core HTTP, worker, and performance settings. |\n| `proxy.conf` | Dedicated reverse proxy configuration for caching, buffering, and timeout handling. |\n| Other files under `conf.d/`, `sites-enabled/`, `modules-enabled/` | Modular configurations for specific sites, virtual hosts, and modules. |\n\n---\n\n## 🔧 Highlights from `nginx.conf`\n\n- **Worker configuration**\n  ```nginx\n  worker_processes 2;\n  worker_connections 2048;\n  worker_rlimit_nofile 100000;\n  ```\n- **Connection handling**\n  ```nginx\n  use epoll;\n  multi_accept on;\n  sendfile on;\n  tcp_nopush on;\n  tcp_nodelay on;\n  ```\n- **Keepalive and timeout tuning**\n  ```nginx\n  keepalive_timeout 30;\n  keepalive_requests 100000;\n  client_body_timeout 10;\n  send_timeout 2;\n  ```\n\n- **GZIP compression**\n  Includes extended MIME types for modern web assets, fonts, images, and office formats.\n\n- **Security**\n  ```nginx\n  ssl_protocols TLSv1.2 TLSv1.3;\n  ssl_prefer_server_ciphers on;\n  server_tokens off;\n  ```\n\n\u003e ⚠️ **Note:** `SSLv3` is **not recommended** due to known vulnerabilities. You should only use `TLSv1.2` and `TLSv1.3`.\n\n---\n\n## 📦 Highlights from `proxy.conf`\n\n- **Caching setup**\n  ```nginx\n  proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=my_cache:10m max_size=10g inactive=60m;\n  ```\n- **Timeouts**\n  ```nginx\n  proxy_connect_timeout 5s;\n  proxy_send_timeout 60s;\n  proxy_read_timeout 60s;\n  ```\n- **Buffer tuning**\n  ```nginx\n  proxy_buffer_size 16k;\n  proxy_buffers 32 16k;\n  proxy_busy_buffers_size 64k;\n  ```\n\n- **Upstream failover**\n  ```nginx\n  proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;\n  ```\n\n- **Security headers and versioning**\n  Proper headers are set to forward client info and manage protocol details.\n\n---\n\n## 📊 Logging Format\n\nCustom JSON-formatted logs for use with structured log platforms:\n\n```nginx\nlog_format custom_json_log escape=json '{ \"remote_addr\": \"$remote_addr\", \"request\": \"$request\", ... }';\n```\n\nLogs are saved to:\n- `/var/log/nginx/access.log`\n- `/var/log/nginx/error.log`\n\n---\n\n## ✅ Recommendations\n\n- Increase your system's open file limits with:\n  ```bash\n    ulimit -n 100000\n  ```\n- Rotate logs with `logrotate` to avoid filling disk\n- Consider removing `SSLv3` from SSL protocols if security is a top priority\n\n---\n\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE). See the license file for details.\n\n---\n\n## Issues, Feature Requests or Support\n\nPlease use the Issue \u003e New Issue button to submit issues, feature requests or support issues directly to me. You can also send an e-mail to akin.bicer@outlook.com.tr.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcynegeirus%2Fnginx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcynegeirus%2Fnginx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcynegeirus%2Fnginx/lists"}