0

I've setup a httpd with docker:

FROM httpd:2.4-alpine

# load required modules (unfortunately gzip is not available)
RUN sed -i '/LoadModule rewrite_module/s/^#//g' /usr/local/apache2/conf/httpd.conf
RUN sed -i '/LoadModule deflate_module/s/^#//g' /usr/local/apache2/conf/httpd.conf

# AllowOverride All so that custom .htaccess is applied
RUN sed -i 's#AllowOverride [Nn]one#AllowOverride All#' /usr/local/apache2/conf/httpd.conf

Runs fine, but i need the mod_gzip module enabled which is not listed in httpd.conf

What i need to do in order to get the mod_gzip enabled in official docker httpd:2.4-alpine image?

davey
  • 1,666
  • 17
  • 24
  • 1
    there is no `mod_gzip` only `mod_deflate` in apache 2.4. See this doc to configure. https://httpd.apache.org/docs/current/mod/mod_deflate.html – tinker Jun 23 '20 at 15:16

1 Answers1

0

Seems like mod_gzip is obsolete for apache 2.4 and mod_deflate is the way to go for doing the compression.

mod_deflate is integrated in the default apache package and just have to be enabled, mod_gzip remained external extension module and the integration is complex

davey
  • 1,666
  • 17
  • 24