Sign inSign up

grenadecastle/apache

By grenadecastle

•Updated over 5 years ago

Fully featured Apache builds with integrated and configured HTTP/2, Brotli, dhparams and compression

Image
1

489

grenadecastle/apache repository overview

This is a Grenade Castle private Apache build repository. We decided to make it public. It comes with no support and no guarantee, however these images are widely used on tons of our project without any problems. These images are provided as complete and (unless there's a huge bug) will be updated only when there's a new major Apache version.

Motivation behind these images: we needed a fully featured Apache for our many project and we didn't want to create a custom Apache build for every client. So we decided to make a big Apache build with all it can handle.

⁠What's included?

This is a fully featured Apache. It has enabled: proxy, proxy_fcgi, brotli, rewrite, allowmethods, auth_basic, auth_digest, auth_form, cache, cache_disk, cache_socache, deflate, env, expires, filter, headers, heartbeat, heartmonitor, http2, include, info, log_debug, mime, mime_magic, negotiation, proxy, proxy_http2, ratelimit, remoteip, request, session, session_cookie, session_crypto, session_dbd, setenvif, speling, ssl, status, unique_id, vhost_alias. Best thing about this image is that it comes with fully functional HTTP/2 and Brotli compression. It also has included Apache boilerplate for fast and secure loading. It has enabled modern SSL features with DHparams generated on first run. Modern compression is also enabled and configured out of the box.

⁠First run

First run will take a long time, because dhparams need to be generated. This is a security precausion and it can take up to few minutes, depending on your computer's power. You'll be stuck at message Generating DH parameters, 2048 bit long safe prime, generator 2, so be patient. You can link /etc/ssl/private outside your image to speed up this process after restart and to create a permanent storage.

⁠How to run these images?

These images are made to be used with PHP-FPM in mind. We provide a fully-featured PHP images at https://hub.docker.com/r/grenadecastle/php⁠.

⁠Configuration

All configuration files can be found in our public repository on GitHub. https://github.com/JustGetSchwifty/apache⁠

⁠Example docker-compose.yml

version: '3.7'

services:
  example-apache:
    image: grenadecastle/apache:latest
    container_name: example-apache
    volumes:
      - ./web/:/var/www/html/:rw
      - ./_config/apache2/apache2.conf:/etc/apache2/apache2.conf:rw
      - ./_config/apache2/custom-conf/:/etc/apache2/custom-conf/:rw
      - ./_config/apache2/ssl/:/etc/apache2/ssl/:rw
      - ./_config/apache2/sites-enabled/:/etc/apache2/sites-enabled/:rw
      - ./_logs/apache/:/var/log/apache2/:rw
    ports:
      - 80:80
      - 443:443
    external_links:
      - "example-php:fpm"

  example-php:
    image: grenadecastle/php:release-7.4
    depends_on:
      - example-apache
    container_name: example-php
    expose:
      - 9000
    volumes:
      - ./web/:/var/www/html/:rw
      - ./_config/php/:/usr/local/etc/php/:rw
      - ./_config/php-fpm/:/usr/local/etc/php-fpm.d/:rw
      - ./_logs/php/:/var/log/php/:rw

The _config directory for Apache can be downloaded here: https://github.com/JustGetSchwifty/apache⁠, PHP image and PHP _config can be found here: https://hub.docker.com/r/grenadecastle/php⁠, https://github.com/JustGetSchwifty/php⁠ (choose the right branch for your PHP version).

Tag summary

Content type

Image

Digest

Size

181.1 MB

Last updated

over 5 years ago

docker pull grenadecastle/apache