{"id":34976411,"url":"https://github.com/pvormste/apache_mod_ssl_example","last_synced_at":"2026-03-17T19:38:56.334Z","repository":{"id":327589857,"uuid":"1091654674","full_name":"pvormste/apache_mod_ssl_example","owner":"pvormste","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-08T15:27:09.000Z","size":11,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-28T12:44:29.014Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","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/pvormste.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-07T10:21:19.000Z","updated_at":"2025-12-08T15:27:13.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/pvormste/apache_mod_ssl_example","commit_stats":null,"previous_names":["pvormste/apache_mod_ssl_example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pvormste/apache_mod_ssl_example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvormste%2Fapache_mod_ssl_example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvormste%2Fapache_mod_ssl_example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvormste%2Fapache_mod_ssl_example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvormste%2Fapache_mod_ssl_example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pvormste","download_url":"https://codeload.github.com/pvormste/apache_mod_ssl_example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvormste%2Fapache_mod_ssl_example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30629689,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T17:32:55.572Z","status":"ssl_error","status_checked_at":"2026-03-17T17:32:38.732Z","response_time":56,"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":[],"created_at":"2025-12-27T00:13:44.056Z","updated_at":"2026-03-17T19:38:56.304Z","avatar_url":"https://github.com/pvormste.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Apache mTLS proxy to JSON (docker-compose)\n\nOverview\n- Apache (custom image) listens on 443 and requires client certificate verification (mTLS).\n- If the client TLS handshake succeeds, Apache proxies the path /secure-json to a backend static server that serves a JSON file.\n- You provide certificates by mounting a host directory into the container (default: `./certs`).\n\nWhat you get\n- docker-compose.yml — starts `apache` and `json-backend` services.\n- apache/ — Dockerfile and Apache site configuration that enables mod_ssl and mod_proxy.\n- backend/myfile.json — the JSON file served by the backend.\n\nRequired files (place in `./certs` on the host)\n- server.crt    — server certificate (PEM)\n- server.key    — server private key (PEM)\n- ca.crt        — CA certificate that signs client certificates (PEM)\n\n(Optional for testing)\n- client.crt, client.key — a client certificate and key signed by `ca.crt`\n\nHow to run\n1. Place your certificates in `./certs` relative to the compose file (server.crt, server.key, ca.crt).\n   - Files must be readable by Docker (they'll be mounted read-only).\n2. Start:\n   docker compose up --build\n3. Test (from the machine where the client cert/key are available):\n   curl -v --cert ./certs/client.crt --key ./certs/client.key --cacert ./certs/ca.crt https://localhost/secure-json\n\nIf the client certificate is valid (signed by ca.crt and matches the key), you should get the JSON contents. If not, the TLS handshake will be rejected.\n\nOpenSSL commands to create a quick test CA, server and client (for local testing only)\n1) CA:\n   openssl genrsa -out ca.key 4096\n   openssl req -x509 -new -nodes -key ca.key -sha256 -days 3650 -out ca.crt -subj \"/CN=Test CA\"\n\n2) Server:\n   openssl genrsa -out server.key 2048\n   openssl req -new -key server.key -out server.csr -subj \"/CN=localhost\"\n   # Create a small extfile to mark subjectAltName\n   printf \"subjectAltName = DNS:localhost,IP:127.0.0.1\\n\" \u003e ext.cnf\n   openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt -days 365 -sha256 -extfile ext.cnf\n\n3) Client:\n   openssl genrsa -out client.key 2048\n   openssl req -new -key client.key -out client.csr -subj \"/CN=test-client\"\n   openssl x509 -req -in client.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out client.crt -days 365 -sha256\n\nPut server.crt, server.key, ca.crt, client.crt, client.key into `./certs` and then run docker compose up --build and test with curl.\n\nNotes\n- The proxy path in Apache is /secure-json and is proxied to http://json-backend:8080/myfile.json (the backend service name in docker-compose).\n- The Apache config sets `SSLVerifyClient require` and uses `SSLCACertificateFile /etc/apache2/certs/ca.crt`. You may adjust `SSLVerifyDepth` if you have deeper chains.\n- For debugging TLS issues, check Apache logs in the container: docker compose logs apache\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpvormste%2Fapache_mod_ssl_example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpvormste%2Fapache_mod_ssl_example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpvormste%2Fapache_mod_ssl_example/lists"}