{"id":28994014,"url":"https://github.com/ehabmagdyy/nginx","last_synced_at":"2026-02-09T21:16:16.269Z","repository":{"id":277649872,"uuid":"933095252","full_name":"EhabMagdyy/Nginx","owner":"EhabMagdyy","description":"Nginx Examples in linux","archived":false,"fork":false,"pushed_at":"2025-02-18T06:15:18.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-22T05:21:10.779Z","etag":null,"topics":["nginx","nginx-load-balancer","nginx-reverseproxy","nginx-webserver"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EhabMagdyy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-02-15T06:04:08.000Z","updated_at":"2025-02-18T06:15:22.000Z","dependencies_parsed_at":"2025-02-21T23:30:12.517Z","dependency_job_id":null,"html_url":"https://github.com/EhabMagdyy/Nginx","commit_stats":null,"previous_names":["ehabmagdyy/nginx"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/EhabMagdyy/Nginx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EhabMagdyy%2FNginx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EhabMagdyy%2FNginx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EhabMagdyy%2FNginx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EhabMagdyy%2FNginx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EhabMagdyy","download_url":"https://codeload.github.com/EhabMagdyy/Nginx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EhabMagdyy%2FNginx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29281661,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T19:05:41.198Z","status":"ssl_error","status_checked_at":"2026-02-09T19:05:37.449Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-load-balancer","nginx-reverseproxy","nginx-webserver"],"created_at":"2025-06-25T03:09:39.462Z","updated_at":"2026-02-09T21:16:16.250Z","avatar_url":"https://github.com/EhabMagdyy.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 1. Nginx as Web Server\n### Files locations (in ubuntu)\n```bash\n# nginx.conf\n/etc/nginx\n\n# default\n/etc/nginx/sites-enabled\n\n# ehab.html\n/var/www/html\n```\n\n### Run in the browser\n```bash\n# \u003cipAddr\u003e:Port\nlocalhost:81\n```\n\n#### Output\n\u003e ![Image](https://github.com/user-attachments/assets/cb6f21b1-342e-4f8d-91c1-da5471ad6bdf)\n\n---\n\n## 2. Nginx as ReverseProxy and Load Balancer\n### Files locations (in ubuntu)\n```bash\n# nginx.conf\n/etc/nginx\n\n# default\n/etc/nginx/sites-enabled\n\n# server.js -\u003e anywhere\n```\n\n### Run the project\n\u003e #### Run the server\n```bash\n# Run server.js multiple times, for testing load balancing on multiple servers\nnode server.js 3001 \u0026\nnode server.js 3002 \u0026\nnode server.js 3003 \u0026\nnode server.js 3004 \u0026\n```\n\n\u003e #### request in the web browser\n```bash\n# \u003cipAddr\u003e:Port\nlocalhost:82\n```\n\n#### in this example, i'm using \"least connection\" in load balancing\n\u003e #### output:\n\u003e ![Image](https://github.com/user-attachments/assets/e6d89798-c151-451b-ac23-cf690d093928)\n\u003e ![Image](https://github.com/user-attachments/assets/d346ab2d-e882-4aae-bc6e-f1695a76f2fc)\n\u003e ![Image](https://github.com/user-attachments/assets/4ed949e0-ebc5-4e67-9d16-fe058f6de3ce)\n\u003e ![Image](https://github.com/user-attachments/assets/461a7574-f6e0-444d-8e56-526367971051)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fehabmagdyy%2Fnginx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fehabmagdyy%2Fnginx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fehabmagdyy%2Fnginx/lists"}