{"id":25050979,"url":"https://github.com/angablue/nginx-snippets","last_synced_at":"2026-04-29T18:32:32.385Z","repository":{"id":115237787,"uuid":"528500619","full_name":"AngaBlue/nginx-snippets","owner":"AngaBlue","description":"A collection of NGINX snippets designed to be used for hosting Node.js servers behind Cloudflare.","archived":false,"fork":false,"pushed_at":"2022-08-24T17:03:07.000Z","size":6,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-16T13:04:46.630Z","etag":null,"topics":["nginx","nginx-reverse-proxy","nodejs"],"latest_commit_sha":null,"homepage":"","language":null,"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/AngaBlue.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":"2022-08-24T16:14:40.000Z","updated_at":"2024-09-06T05:04:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"f4d2a9eb-aade-42b8-bdf8-f8ae15c995d5","html_url":"https://github.com/AngaBlue/nginx-snippets","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AngaBlue/nginx-snippets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AngaBlue%2Fnginx-snippets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AngaBlue%2Fnginx-snippets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AngaBlue%2Fnginx-snippets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AngaBlue%2Fnginx-snippets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AngaBlue","download_url":"https://codeload.github.com/AngaBlue/nginx-snippets/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AngaBlue%2Fnginx-snippets/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32439179,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T18:12:22.909Z","status":"ssl_error","status_checked_at":"2026-04-29T18:11:33.322Z","response_time":110,"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-reverse-proxy","nodejs"],"created_at":"2025-02-06T09:18:43.394Z","updated_at":"2026-04-29T18:32:32.378Z","avatar_url":"https://github.com/AngaBlue.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# NGINX Snippets\nA collection of NGINX snippets designed to be used for hosting multiple Node.js servers.\n\nI use these settings behind Cloudflare to provide Full (strict) end-to-end encryption.  Using a Cloudflare Origin CA certificate is the easiest way to accomplish this, although this certificate is not trusted by clients; meaning you must use a different certificate issued by CA (such as [Let's Encrypt](https://letsencrypt.org/)) in order to server traffic that does not pass through Cloudflare.\n\nFor other NGINX setups, [Digital Ocean's NGINXConfig tool](https://www.digitalocean.com/community/tools/nginx) is a great place to start.\n\n## Configuration files\n\n### nginx.conf `/etc/nginx/nginx.conf`\nBase server settings that:\n* Set-up logging.\n* Import other config files.\n* Specifies TLS settings.\n* Provides variables for other configuration files.\n\n### headers.conf `/etc/nginx/conf.d/headers.conf`\nAdds general security headers to all requests.\n* Restrictive CORS \u0026 permissions policy\n* iFrame blocking\n* Tracking blocking\n\n___Note:__ these headers include HSTS, meaning if you don't plan to support HTTPS on all hosted sites now and into the future, you must remove this header._\n\n### ssl.conf `/etc/nginx/sites-enabled/ssl.conf`\nForce all HTTP connections to retry via HTTPS.  Subsequently, all other NGINX server blocks should listen on port 443.\n\nBy default, a certificate at `/etc/ssl/certs/certificate.pem` with a key at `/etc/ssl/private/certificate.key` are used.  These names and locations can of course be changed.\n\nIf multiple certificates are needed for various domains, the default certificate can be overridden inside a server block using the following snippet.\n\n```\nssl_certificate /etc/ssl/certs/other-cert.pem;\nssl_certificate_key /etc/ssl/private/other-cert.key;\n```\n\n### timeout.conf `/etc/nginx/conf.d/timeout.conf`\nConfigures various request and response timeouts to be 30 seconds.\n\n### proxy-params.conf `/etc/nginx/snippets/proxy-params.conf`\nVarious proxy parameters that ensure information is correctly passed to the server to be included in each proxy server location block.\n\n## Example server block usage `/etc/nginx/sites-enabled/example.com`\nRoute requests to the domain `example.com` to the server running locally on the port `9000`.\n\n```\nserver {\n    listen 443;\n\n    server_name subdomain.example.com example.com;\n    \n    location / {\n        proxy_pass http://127.0.0.1:9000;\n        include /etc/nginx/snippets/proxy-params.conf;\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangablue%2Fnginx-snippets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fangablue%2Fnginx-snippets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangablue%2Fnginx-snippets/lists"}