{"id":24511937,"url":"https://github.com/paulo-correia/docker_apache_vhosts","last_synced_at":"2025-06-12T16:33:41.526Z","repository":{"id":134105619,"uuid":"261594112","full_name":"paulo-correia/Docker_Apache_VHOSTS","owner":"paulo-correia","description":"Apache VHOSTS on Docker","archived":false,"fork":false,"pushed_at":"2020-05-05T22:12:54.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-22T00:43:05.205Z","etag":null,"topics":["alpine","apache","docker","dockerfile","vhosts"],"latest_commit_sha":null,"homepage":"","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/paulo-correia.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":"2020-05-05T22:10:34.000Z","updated_at":"2020-05-05T22:15:44.000Z","dependencies_parsed_at":"2024-06-19T05:31:44.343Z","dependency_job_id":null,"html_url":"https://github.com/paulo-correia/Docker_Apache_VHOSTS","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/paulo-correia%2FDocker_Apache_VHOSTS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulo-correia%2FDocker_Apache_VHOSTS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulo-correia%2FDocker_Apache_VHOSTS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulo-correia%2FDocker_Apache_VHOSTS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paulo-correia","download_url":"https://codeload.github.com/paulo-correia/Docker_Apache_VHOSTS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243713416,"owners_count":20335567,"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":["alpine","apache","docker","dockerfile","vhosts"],"created_at":"2025-01-22T00:43:31.549Z","updated_at":"2025-03-15T10:09:27.564Z","avatar_url":"https://github.com/paulo-correia.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Apache VHOSTS on Docker (Alpine Linux Image)\n\n## Save Dockerfile on a folder Ex: Apache\n**Caution: Only one dockerfile per folder**\n\n### Generate image\n\ndocker build -t `\u003cname\u003e` .\n\n`\u003cname\u003e` = Ex: apache or your_docker_hub_name/apache:1.0\n\n### Running Container\n\ndocker run -d -p `\u003clocal port\u003e`:80 `\u003cname\u003e`\n\n`\u003clocal port\u003e` = Ex 8080\n\n### If don't generate image, get from docker hub\n\ndocker run -d -p `\u003clocal port\u003e`:80 paulocorreia/alpine_apache_vhosts:1.0\n\n### GET Current IP from your running Container\n\ndocker container exec -it `\u003ccontainer name or id\u003e` /bin/sh\n\n`\u003ccontainer name or id\u003e` you get on docker ps\n\ninside your container type ifconfig and get inet addr on eth0 - Ex 172.17.0.2 \n\n### Change your hosts file\nIf your OS is Linux:\n\nEdit as root your /etc/hosts and add a line ate end of file \u003cbr\u003e\non `\u003ccontainer IP\u003e` put your container IP - Ex 172.17.0.2\n\n`\u003ccontainer IP\u003e` sample.dck\u003cbr\u003e\n`\u003ccontainer IP\u003e` other.dck\n\nAnd save\n\nOr is Windows:\n\nEdit  C:\\Windows\\System32\\drivers\\etc\\hosts and add a line ate end of file \u003cbr\u003e\non `\u003ccontainer IP\u003e` put your container IP - Ex 172.17.0.2\n\n`\u003ccontainer IP\u003e` sample.dck\u003cbr\u003e\n`\u003ccontainer IP\u003e` other.dck\n\nAnd save\n\n### Open Browser\n\nOpen `http://sample.dck` if you see SAMPLE - VHOSTS on Docker is OK\u003cbr\u003e\nOpen `http://other.dck/` if you see OTHER - VHOSTS on Docker is OK\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulo-correia%2Fdocker_apache_vhosts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaulo-correia%2Fdocker_apache_vhosts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulo-correia%2Fdocker_apache_vhosts/lists"}