{"id":16674256,"url":"https://github.com/waltertamboer/experiment-docker-nginx-proxy","last_synced_at":"2026-05-06T01:35:27.101Z","repository":{"id":146292674,"uuid":"213586584","full_name":"waltertamboer/experiment-docker-nginx-proxy","owner":"waltertamboer","description":"This repository contains an experiment where I set up two sites within Docker containers and nginx acts as a proxy.","archived":false,"fork":false,"pushed_at":"2019-10-08T08:49:59.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-19T19:49:37.153Z","etag":null,"topics":["apache","docker","docker-compose","httpd","nginx","proxy"],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/waltertamboer.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":"2019-10-08T08:18:43.000Z","updated_at":"2019-10-08T08:50:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"b4d9e0e3-821a-456c-a875-9433d83783cf","html_url":"https://github.com/waltertamboer/experiment-docker-nginx-proxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waltertamboer%2Fexperiment-docker-nginx-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waltertamboer%2Fexperiment-docker-nginx-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waltertamboer%2Fexperiment-docker-nginx-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waltertamboer%2Fexperiment-docker-nginx-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/waltertamboer","download_url":"https://codeload.github.com/waltertamboer/experiment-docker-nginx-proxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243326961,"owners_count":20273579,"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","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":["apache","docker","docker-compose","httpd","nginx","proxy"],"created_at":"2024-10-12T12:29:59.631Z","updated_at":"2025-10-25T21:12:49.790Z","avatar_url":"https://github.com/waltertamboer.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# experiment-docker-nginx-proxy\n\nThis repository contains an experiment where I set up two sites within Docker containers and \nnginx acts as a proxy.\n\n## The Problem\n\nConsider running multiple webserver containers on the same server. How does the server know \nwhich container to serve to the user?\n\n## Solution  \n\nThis project contains a `docker-compose.yml` file containing three containers. Two websites \nthat serve a webpage via Apache httpd: \"Site 1\" and \"Site 2\". The third container is an nginx\ncontainer acting as a proxy between the two sites.\n\nWithin the nginx configuration two sites are defined with two different server names:\n- site1.experiment.waltertamboer.nl\n- site2.experiment.waltertamboer.nl\n\nEach container runs on a different port (8081 and 8082 in this example). When one of these \naddresses is entered in the browser, the proxy knows to which container the user should be \nredirected.\n\n## Installation\n\n- Clone the repository\n- Edit your `/etc/hosts` file and make sure it contains the following lines:\n    ```\n    127.0.0.1 site1.experiment.waltertamboer.nl\n    127.0.0.1 site2.experiment.waltertamboer.nl\n    ``` \n- Start up the containers: `docker-compose up -d`\n\nNow you'll be able to visit site 1 and site 2 via the following addresses:\n- http://site1.experiment.waltertamboer.nl\n- http://site2.experiment.waltertamboer.nl\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaltertamboer%2Fexperiment-docker-nginx-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaltertamboer%2Fexperiment-docker-nginx-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaltertamboer%2Fexperiment-docker-nginx-proxy/lists"}