{"id":16540656,"url":"https://github.com/sameersbn/docker-apache","last_synced_at":"2026-05-29T01:32:21.581Z","repository":{"id":73806528,"uuid":"70596602","full_name":"sameersbn/docker-apache","owner":"sameersbn","description":null,"archived":false,"fork":false,"pushed_at":"2016-10-13T05:44:00.000Z","size":70,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-29T00:08:20.653Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sameersbn.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":"2016-10-11T13:33:11.000Z","updated_at":"2016-10-13T16:40:35.000Z","dependencies_parsed_at":"2023-04-14T18:19:16.545Z","dependency_job_id":null,"html_url":"https://github.com/sameersbn/docker-apache","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sameersbn/docker-apache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameersbn%2Fdocker-apache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameersbn%2Fdocker-apache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameersbn%2Fdocker-apache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameersbn%2Fdocker-apache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sameersbn","download_url":"https://codeload.github.com/sameersbn/docker-apache/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameersbn%2Fdocker-apache/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33633468,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-10-11T18:53:00.500Z","updated_at":"2026-05-29T01:32:21.562Z","avatar_url":"https://github.com/sameersbn.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](http://bitnami-container-builds.bitnamiapp.com/jenkins/buildStatus/icon?job=docker-apache)](http://bitnami-container-builds.bitnamiapp.com/jenkins/job/docker-apache/)\n[![Docker Hub Automated Build](http://container.checkforupdates.com/badges/bitnami/apache)](https://hub.docker.com/r/bitnami/apache/)\n\n\n# What is Apache?\n\n\u003e The Apache HTTP Server Project is an effort to develop and maintain an open-source HTTP server for modern operating systems including UNIX and Windows NT. The goal of this project is to provide a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards.\n\n[http://httpd.apache.org/](http://httpd.apache.org/)\n\n# TLDR\n\n```bash\ndocker run --name apache bitnami/apache:latest\n```\n\n## Docker Compose\n\n```yaml\napache:\n  image: bitnami/apache:latest\n```\n\n# Get this image\n\nThe recommended way to get the Bitnami Apache Docker Image is to pull the prebuilt image from the [Docker Hub Registry](https://hub.docker.com/r/bitnami/apache).\n\n```bash\ndocker pull bitnami/apache:latest\n```\n\nTo use a specific version, you can pull a versioned tag. You can view the [list of available versions](https://hub.docker.com/r/bitnami/apache/tags/) in the Docker Hub Registry.\n\n```bash\ndocker pull bitnami/apache:[TAG]\n```\n\nIf you wish, you can also build the image yourself.\n\n```bash\ndocker build -t bitnami/apache:latest https://github.com/bitnami/bitnami-docker-apache.git\n```\n\n# Hosting a static website\n\nThe `/app` path is configured as the Apache [DocumentRoot](https://httpd.apache.org/docs/2.4/urlmapping.html#documentroot). Content mounted here is served by the default catch-all virtual host.\n\n```bash\ndocker run --name apache -v /path/to/app:/app bitnami/apache:latest\n```\n\nor using Docker Compose:\n\n```\napache:\n  image: bitnami/apache:latest\n  volumes:\n    - /path/to/app:/app\n```\n\n# Accessing your server from the host\n\nTo access your web server from your host machine you can ask Docker to map a random port on your host to ports `80` and `443` exposed in the container.\n\n```bash\ndocker run --name apache -P bitnami/apache:latest\n```\n\nRun `docker port` to determine the random ports Docker assigned.\n\n```bash\n$ docker port apache\n443/tcp -\u003e 0.0.0.0:32768\n80/tcp -\u003e 0.0.0.0:32769\n```\n\nYou can also manually specify the ports you want forwarded from your host to the container.\n\n```bash\ndocker run -p 8080:80 -p 8443:443 bitnami/apache:latest\n```\n\nAccess your web server in the browser by navigating to [http://localhost:8080](http://localhost:8080/).\n\n# Configuration\n\n## Adding custom virtual hosts\n\nThe default `httpd.conf` includes virtual hosts placed in `/bitnami/apache/conf/vhosts/*.conf`. You can mount a directory at `/bitnami/apache/conf/vhosts` from your host containing your custom virtual hosts.\n\n```bash\ndocker run -v /path/to/apache-persistence/vhosts:/bitnami/apache/conf/vhosts bitnami/apache:latest\n```\n\nor using Docker Compose:\n\n```\napache:\n  image: bitnami/apache:latest\n  volumes:\n    - /path/to/apache-persistence/vhosts:/bitnami/apache/conf/vhosts\n```\n\n## Full configuration\n\nThis container looks for configuration in `/bitnami/apache/conf`. You can mount a directory at `/bitnami/apache/` with your own configuration, or the default configuration will be copied to your directory at `conf/` if it is empty.\n\n### Step 1: Run the Apache image\n\nRun the Apache image, mounting a directory from your host.\n\n```bash\ndocker run --name apache -v /path/to/apache-persistence:/bitnami/apache bitnami/apache:latest\n```\n\nor using Docker Compose:\n\n```\napache:\n  image: bitnami/apache:latest\n  volumes:\n    - /path/to/apache-persistence:/bitnami/apache\n```\n\n### Step 2: Edit the configuration\n\nEdit the configuration on your host using your favorite editor.\n\n```bash\nvi /path/to/apache-persistence/conf/httpd.conf\n```\n\n### Step 4: Restart Apache\n\nAfter changing the configuration, restart your Apache container for the changes to take effect.\n\n```bash\ndocker restart apache\n```\n\nor using Docker Compose:\n\n```bash\ndocker-compose restart apache\n```\n\n# Reverse proxy to other containers\n\nApache can be used to reverse proxy to other containers using Docker's linking system. This is particularly useful if you want to serve dynamic content through an Apache frontend.\n\n**Further Reading:**\n\n  - [mod_proxy documentation](http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#forwardreverse)\n\n# Logging\n\nThe Bitnami Apache Docker image sends the container logs to the `stdout`. To view the logs:\n\n```bash\ndocker logs apache\n```\n\nor using Docker Compose:\n\n```bash\ndocker-compose logs apache\n```\n\nYou can configure the containers [logging driver](https://docs.docker.com/engine/admin/logging/overview/) using the `--log-driver` option if you wish to consume the container logs differently. In the default configuration docker uses the `json-file` driver.\n\n# Maintenance\n\n## Backing up your container\n\nTo backup your configuration, follow these simple steps:\n\n### Step 1: Stop the currently running container\n\n```bash\ndocker stop apache\n```\n\nor using Docker Compose:\n\n```bash\ndocker-compose stop apache\n```\n\n### Step 2: Run the backup command\n\nWe need to mount two volumes in a container we will use to create the backup: a directory on your host to store the backup in, and the volumes from the container we just stopped so we can access the data.\n\n```bash\ndocker run --rm -v /path/to/apache-backups:/backups \\\n  --volumes-from apache busybox \\\n    cp -a /bitnami/apache /backups/latest\n```\n\nor using Docker Compose:\n\n```bash\ndocker run --rm -v /path/to/apache-backups:/backups \\\n  --volumes-from `docker-compose ps -q apache` busybox \\\n    cp -a /bitnami/apache /backups/latest\n```\n\n## Restoring a backup\n\nRestoring a backup is as simple as mounting the backup as volumes in the container.\n\n```bash\ndocker run -v /path/to/apache-backups/latest:/bitnami/apache bitnami/apache:latest\n```\n\nor using Docker Compose:\n\n```\napache:\n  image: bitnami/apache:latest\n  volumes:\n    - /path/to/apache-backups/latest:/bitnami/apache\n```\n\n## Upgrade this image\n\nBitnami provides up-to-date versions of Apache, including security patches, soon after they are made upstream. We recommend that you follow these steps to upgrade your container.\n\n### Step 1: Get the updated image\n\n```bash\ndocker pull bitnami/apache:latest\n```\n\nor if you're using Docker Compose, update the value of the image property to\n`bitnami/apache:latest`.\n\n### Step 2: Stop and backup the currently running container\n\nBefore continuing, you should backup your container's configuration and logs.\n\nFollow the steps on [creating a backup](#backing-up-your-container).\n\n### Step 3: Remove the currently running container\n\n```bash\ndocker rm -v apache\n```\n\nor using Docker Compose:\n\n```bash\ndocker-compose rm -v apache\n```\n\n### Step 4: Run the new image\n\nRe-create your container from the new image, [restoring your backup](#restoring-a-backup) if necessary.\n\n```bash\ndocker run --name apache bitnami/apache:latest\n```\n\nor using Docker Compose:\n\n```bash\ndocker-compose start apache\n```\n\n# Testing\n\nThis image is tested for expected runtime behavior, using the [Bats](https://github.com/sstephenson/bats) testing framework. You can run the tests on your machine using the `bats` command.\n\n```\nbats test.sh\n```\n\n# Notable Changes\n\n## 2.4.18-r0\n\n- All volumes have been merged at `/bitnami/apache`. Now you only need to mount a single volume at `/bitnami/apache` for persistence.\n- The logs are always sent to the `stdout` and are no longer collected in the volume.\n\n## 2.4.12-4-r01\n\n- The `/app` directory is no longer exported as a volume. This caused problems when building on top of the image, since changes in the volume are not persisted between Dockerfile `RUN` instructions. To keep the previous behavior (so that you can mount the volume in another container), create the container with the `-v /app` option.\n\n# Contributing\n\nWe'd love for you to contribute to this container. You can request new features by creating an [issue](https://github.com/bitnami/bitnami-docker-apache/issues), or submit a [pull request](https://github.com/bitnami/bitnami-docker-apache/pulls) with your contribution.\n\n# Issues\n\nIf you encountered a problem running this container, you can file an [issue](https://github.com/bitnami/bitnami-docker-apache/issues). For us to provide better support, be sure to include the following information in your issue:\n\n- Host OS and version\n- Docker version (`docker version`)\n- Output of `docker info`\n- Version of this container (`echo $BITNAMI_APP_VERSION` inside the container)\n- The command you used to run the container, and any relevant output you saw (masking any sensitive information)\n\n# License\n\nCopyright (c) 2015-2016 Bitnami\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsameersbn%2Fdocker-apache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsameersbn%2Fdocker-apache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsameersbn%2Fdocker-apache/lists"}