{"id":30288479,"url":"https://github.com/ddewaele/nginx-https","last_synced_at":"2026-04-09T21:57:19.873Z","repository":{"id":232677801,"uuid":"632310024","full_name":"ddewaele/nginx-https","owner":"ddewaele","description":"simpel project with an ngixn / docker-compose / self signed certs","archived":false,"fork":false,"pushed_at":"2023-04-25T06:35:14.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-15T12:24:41.064Z","etag":null,"topics":["docker","docker-compose","https","nginx","tutorial"],"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/ddewaele.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}},"created_at":"2023-04-25T06:34:17.000Z","updated_at":"2023-04-25T06:35:44.000Z","dependencies_parsed_at":"2024-04-11T00:27:09.358Z","dependency_job_id":"f8832330-7b9c-4fb5-a1a3-769a99130f04","html_url":"https://github.com/ddewaele/nginx-https","commit_stats":null,"previous_names":["ddewaele/nginx-https"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ddewaele/nginx-https","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddewaele%2Fnginx-https","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddewaele%2Fnginx-https/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddewaele%2Fnginx-https/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddewaele%2Fnginx-https/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ddewaele","download_url":"https://codeload.github.com/ddewaele/nginx-https/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddewaele%2Fnginx-https/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270781211,"owners_count":24643808,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"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":["docker","docker-compose","https","nginx","tutorial"],"created_at":"2025-08-16T22:37:30.382Z","updated_at":"2026-04-09T21:57:14.819Z","avatar_url":"https://github.com/ddewaele.png","language":"HTML","readme":"## Nginx Docker Compose\n\nVery simple Nginx projects with docker compose exposing an nginx server running on port 80 (HTTP) with redirect to 443 (HTTPs) with self signed certificates.\n\nThe following folders are important\n\n- certs : contains the self signed certificates\n- conf.d : contains our nginx config\n- html : contains our html files\n\n## SSL\n\nTo create the self-signed certificates : \n\n```\nopenssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes -subj \"/C=US/O=Nginx/OU=Nginx Github Test/CN=my-tst-playground.com\"\n\nopenssl pkcs12 -export -in cert.pem -inkey key.pem -out cert_key.pfx\n```\n\n## Nginx config\n\n```\nserver {\n    listen 80;\n    server_name my-tst-playground.com;\n    location / {\n        return 301 https://$host$request_uri;\n    }    \n}\nserver {\n    ssl_certificate /etc/certs/cert.pem;\n    ssl_certificate_key /etc/certs/key.pem;    \n    listen 443 ssl;\n    server_name my-tst-playground.com;\n    \n\n    location / {\n        root /usr/share/nginx/html;\n        try_files $uri /index.html;\n    }\n}\n```\n\nAs you can see we have \n\n- 2 server definitions (http and https) \n- a redirect from http to https\n- our self signed certificates referenced\n- a simple index.html\n\n\n## Docker compose\n\nThe docker compose file is reaally simple:\n\n```\nversion: '3'\n\nservices:\n  nginx:\n    image: nginx:latest\n    ports:\n      - \"80:80\"\n      - \"443:443\"\n    volumes:\n      - ./conf.d:/etc/nginx/conf.d\n      - ./certs/cert.pem:/etc/certs/cert.pem\n      - ./certs/key.pem:/etc/certs/key.pem\n      - ./html:/usr/share/nginx/html\n\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddewaele%2Fnginx-https","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fddewaele%2Fnginx-https","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddewaele%2Fnginx-https/lists"}