{"id":22787439,"url":"https://github.com/dogada/loc-nginx-proxy","last_synced_at":"2026-04-14T23:32:29.061Z","repository":{"id":146657454,"uuid":"152892181","full_name":"dogada/loc-nginx-proxy","owner":"dogada","description":"Redirect https://my.project.loc to any Docker container with zero config.","archived":false,"fork":false,"pushed_at":"2019-02-14T08:21:43.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-13T23:40:04.686Z","etag":null,"topics":["development","devops","docker","nginx"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/dogada.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":"2018-10-13T16:37:25.000Z","updated_at":"2019-02-14T08:21:45.000Z","dependencies_parsed_at":"2023-04-28T16:01:44.755Z","dependency_job_id":null,"html_url":"https://github.com/dogada/loc-nginx-proxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dogada/loc-nginx-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dogada%2Floc-nginx-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dogada%2Floc-nginx-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dogada%2Floc-nginx-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dogada%2Floc-nginx-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dogada","download_url":"https://codeload.github.com/dogada/loc-nginx-proxy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dogada%2Floc-nginx-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31819718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T18:05:02.291Z","status":"ssl_error","status_checked_at":"2026-04-14T18:05:01.765Z","response_time":153,"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":["development","devops","docker","nginx"],"created_at":"2024-12-12T00:57:15.996Z","updated_at":"2026-04-14T23:32:29.043Z","avatar_url":"https://github.com/dogada.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Secure nginx proxy for local web development\n\nAccess multiple web-application running inside docker containers using urls like `https://project.loc` instead of `http://localhost:3000`.\n\n1. Create webproxy network\n```\ndocker network create webproxy\n```\nAll Docker containers that you want to access via `loc-nginx-proxy` must be added to this network.\n\n2. Add domains for your projects to `/etc/hosts` or configure `dns-masq` to resolve all `*.loc` to `127.0.0.1`.\n```\n# /etc/hosts\n\n127.0.0.1 whoami.loc\n127.0.0.1 project.loc qa.project.loc\n```\n\n3. Create docker-compose.yml for `loc-nginx-proxy`. On first run it will create __self-signed TLS-certificate__ for '*.loc' domains (for example project.loc, qa.project.loc, api.dev.project.loc) and then will pass control to `jwilder/nginx-proxy`.\n\n```\n# ~/Projects/loc-nginx-proxy/docker-compose.yml\n\nversion: '2'\nservices:\n  loc-nginx-proxy:\n    image: dogada/loc-nginx-proxy:alpine\n    container_name: loc-nginx-proxy\n    ports:\n      - \"80:80\"\n      - \"443:443\"\n    volumes:\n      - /var/run/docker.sock:/tmp/docker.sock:ro\nnetworks:\n  default:\n    external:\n      name: webproxy\n```\n\n4. Start loc-nginx-proxy.\n```\ndocker-compose up - d\n```\n\n5. All docker containers that you want to access using nginx should be added to `webproxy` network and have `VIRTUAL_HOST` env variable, for example:\n```\n# ~/Projects/whoami/docker-compose.yml\n\nversion: '2'\nservices:\n  whoami:\n    image: jwilder/whoami\n    environment:\n      - VIRTUAL_HOST=whoami.loc\n    networks:\n      - default\n      - webproxy\nnetworks:\n  webproxy:\n    external:\n      name: webproxy\n```\n\nThen if you start whoami project with `docker-compose up -d` you should access it by following url: [https://whoami.loc](https://whoami.loc). You may see a security warning because wildcard TLS-certificate for the domain is __self-signed__, but after accepting it secure connection will be established, and all Javascript APIs that require secure connection will be available.\n\nUsing this approach you can configure all your other Docker images that run web-applications to be served by shared `loc-nginx-proxy`.\n\nIf a docker container exposes several ports, you need to add `VIRTUAL_PORT` env variable with port number that `loc-nginx-proxy` should use.\n\n## Advanced configuration\n\nRead more about nginx-proxy configuration: https://github.com/jwilder/nginx-proxy\n\n\n## Building loc-nginx-proxy image\n```\n\ndocker build -t dogada/loc-nginx-proxy -t dogada/loc-nginx-proxy:alpine -f Dockerfile.alpine .\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdogada%2Floc-nginx-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdogada%2Floc-nginx-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdogada%2Floc-nginx-proxy/lists"}