{"id":20031692,"url":"https://github.com/andrejmaya/nginx-ssl-client-cert-example","last_synced_at":"2026-03-07T00:02:07.036Z","repository":{"id":86054606,"uuid":"131276986","full_name":"andrejmaya/nginx-ssl-client-cert-example","owner":"andrejmaya","description":"Command line based example on TLS secured Nginx with client certificates access control ","archived":false,"fork":false,"pushed_at":"2018-06-23T16:04:38.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-02T05:27:44.279Z","etag":null,"topics":[],"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/andrejmaya.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":"2018-04-27T09:40:19.000Z","updated_at":"2018-07-22T06:11:45.000Z","dependencies_parsed_at":"2023-03-05T11:30:21.867Z","dependency_job_id":null,"html_url":"https://github.com/andrejmaya/nginx-ssl-client-cert-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andrejmaya/nginx-ssl-client-cert-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrejmaya%2Fnginx-ssl-client-cert-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrejmaya%2Fnginx-ssl-client-cert-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrejmaya%2Fnginx-ssl-client-cert-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrejmaya%2Fnginx-ssl-client-cert-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrejmaya","download_url":"https://codeload.github.com/andrejmaya/nginx-ssl-client-cert-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrejmaya%2Fnginx-ssl-client-cert-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30204109,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"ssl_error","status_checked_at":"2026-03-06T18:57:34.882Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":[],"created_at":"2024-11-13T09:34:23.336Z","updated_at":"2026-03-07T00:02:07.016Z","avatar_url":"https://github.com/andrejmaya.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# SSL client certificate example with Nginx \n\nFollow these steps to get this example up and running\n\n## Create certificate\n\n```\n#switch to the ssl directory\ncd ssl\n\n#set environment variables\nexport CLIENT_CN=app123\nexport DOMAIN=andrejmaya.com\nexport ORGANIZATION=Andrej Maya\nexport ORGANIZATION_UNIT=Dev\nexport STATE=Hamburg\nexport LOCALITY=Hamburg\n\n#create private key and root cert of CA \nopenssl req -new -x509 -nodes -newkey rsa:4096 -keyout rootCA.key -sha256 -days 365 -out rootCA.pem -subj \"/C=DE/ST=$STATE/L=$LOCALITY/O=$ORGANIZATION/OU=$ORGANIZATION_UNIT/CN=$DOMAIN\" \n\n#server key, certificate and sign request\nopenssl req -new -newkey rsa:4096 -nodes -keyout server.key -out server.csr -subj \"/C=DE/ST=$STATE/L=$LOCALITY/O=$ORGANIZATION/OU=$ORGANIZATION_UNIT/CN=$DOMAIN\"\n\n# sign the request\nopenssl x509 -req -in server.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -out server.crt -days 365 -sha256\n\n\n# client side\nopenssl req -new -newkey rsa:4096 -nodes -keyout client.key -out client.csr -subj \"/C=DE/ST=$STATE/L=$LOCALITY/O=$ORGANIZATION/OU=$ORGANIZATION_UNIT/CN=$DOMAIN\"\n\n#generate client certificate\nopenssl x509 -req -in client.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -out client.crt -days 365 -sha256\n\n# create a p12 which you can import for example into the keychain on OSX\nopenssl pkcs12 -export -in server.crt -inkey server.key -out client-cert.p12\n```\n\n## Start Nginx\n\n`docker-compose up -d`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrejmaya%2Fnginx-ssl-client-cert-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrejmaya%2Fnginx-ssl-client-cert-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrejmaya%2Fnginx-ssl-client-cert-example/lists"}