{"id":21215809,"url":"https://github.com/betahuhn/nginx-certbot","last_synced_at":"2026-04-24T18:41:52.456Z","repository":{"id":103186930,"uuid":"243370468","full_name":"BetaHuhn/nginx-certbot","owner":"BetaHuhn","description":"A nginx configuration file to use with Let's Encrypt HTTPS certificates","archived":false,"fork":false,"pushed_at":"2020-09-29T16:27:44.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-01T21:50:09.316Z","etag":null,"topics":["nginx","nginx-configuration","nginx-proxy","nodejs"],"latest_commit_sha":null,"homepage":"https://certbot.eff.org/lets-encrypt/ubuntubionic-nginx","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/BetaHuhn.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}},"created_at":"2020-02-26T21:33:41.000Z","updated_at":"2021-11-26T16:49:30.000Z","dependencies_parsed_at":"2023-03-13T15:09:23.620Z","dependency_job_id":null,"html_url":"https://github.com/BetaHuhn/nginx-certbot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BetaHuhn/nginx-certbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BetaHuhn%2Fnginx-certbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BetaHuhn%2Fnginx-certbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BetaHuhn%2Fnginx-certbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BetaHuhn%2Fnginx-certbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BetaHuhn","download_url":"https://codeload.github.com/BetaHuhn/nginx-certbot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BetaHuhn%2Fnginx-certbot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32236744,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: 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-configuration","nginx-proxy","nodejs"],"created_at":"2024-11-20T21:45:19.526Z","updated_at":"2026-04-24T18:41:47.447Z","avatar_url":"https://github.com/BetaHuhn.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# nginx-certbot\nA nginx configuration file to use with Let's Encrypt HTTPS certificates.\n\n## Certbot\n### Install Certbot\n\nAdd repository:\n\n`sudo add-apt-repository ppa:certbot/certbot`\n\nUpdate package list:\n\n`sudo apt update`\n\nInstall certbot nginx package:\n\n`sudo apt-get install python-certbot-nginx`\n\n### Certbot commands\n\nGenerate certificate for one or more domains:\n\n`sudo certbot certonly --nginx -d domain.com -d www.domain.com`\n\nGenerate wildcard certificate:\n\n`sudo certbot certonly --manual -d *.domain.com -d domain.com --preferred-challenges dns`\n\n\u003e Note: You will need to add two TXT records in your DNS for the acme-challenge\n\nRenew all certificates:\n\n`sudo certbot renew`\n\n\u003e Note: Only works for none wildcard certificates\n\n## Firewall\n\nView current settings:\n\n`sudo ufw status`\n\nRun:\n\n`sudo ufw allow 'Nginx Full'`\n\nand\n\n`sudo ufw delete allow 'Nginx HTTP'`\n\n## Nginx\n\n### Config file\n\n```\nserver {\n  listen 80;\n  root *PATH TO ROOT FOLDER*;\n  server_name *DOMAIN*;\n  return 301 https://$host$request_uri;\n}\n\nserver {\n  listen 443 ssl http2;\n  listen [::]:443 ssl http2;\n  client_max_body_size 5000M;\n  root *PATH TO ROOT FOLDER*;\n  server_name *DOMAIN*;\n\n  ssl_certificate /etc/letsencrypt/live/*DOMAIN*/fullchain.pem;\n  ssl_certificate_key /etc/letsencrypt/live/*DOMAIN*/privkey.pem;\n  ssl_session_timeout 1d;\n  ssl_session_cache shared:MozSSL:10m;  # about 40000 sessions\n  ssl_session_tickets off;\n\n  ssl_dhparam /etc/letsencrypt/dhparam.pem;\n\n  ssl_protocols TLSv1.2 TLSv1.3;\n  ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;\n  ssl_prefer_server_ciphers on;\n\n  add_header Strict-Transport-Security \"max-age=63072000\" always;\n\n  ssl_stapling on;\n  ssl_stapling_verify on;\n\n  ssl_trusted_certificate /etc/letsencrypt/live/*DOMAIN*/chain.pem;\n\n  resolver 8.8.8.8;\n\n  location / {\n    proxy_pass http://localhost:*PORT NUMBER*;\n    proxy_http_version 1.1;\n    proxy_set_header Upgrade $http_upgrade;\n    proxy_set_header Connection 'upgrade';  \n    proxy_set_header Host $host;\n    proxy_set_header X-Forwarded-For $remote_addr;\n    proxy_cache_bypass $http_upgrade;\n    proxy_intercept_errors on;\n    proxy_pass_request_headers on;\n  }\n}\n```\n\n### Commands\n\nVerify config:\n\n`sudo nginx -t`\n\nRestart nginx:\n\n`sudo service restart nginx`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbetahuhn%2Fnginx-certbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbetahuhn%2Fnginx-certbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbetahuhn%2Fnginx-certbot/lists"}