Skip to content

msansen-esncf/docker-apache-modules

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

docker-apache-modules

Dockerized Apache 2 with ability to enable modules on runtime

Configuration

Environment Variables

A2ENMOD

Will allow you to enable multiple apache modules (coma separated).

A2ENMOD=proxy,proxy_ajp

It will trigger a a2enmod command as provided in Debian based distributions.

Examples

Docker Compose with Proxy AJP module

Example docker-compose.yml file:

apache:
   image: davlord/apache-ajp
   volumes:
     - ./logs:/var/log/apache2/
     - ./mysite.conf:/etc/apache2/sites-enabled/mysite.conf:ro
   environment:
    - A2ENMOD=proxy,proxy_ajp
   ports:
     - "80:80"
     
tomcat:
  image: tomcat
  container_name: tomcat
  expose:
    - "8009"

Where mysite.conf could be :

<VirtualHost *:80>

ServerName www.mydomain.com
ServerAlias mydomain.com

ProxyRequests Off 
ProxyPreserveHost On

ProxyPass / ajp://tomcat:8009/
ProxyPassReverse / ajp://tomcat:8009/

LogLevel warn
ErrorLog /var/log/apache2/mydomain.com-error.log
CustomLog /var/log/apache2/mydomain.com-access.log combined
ServerSignature Off 

</VirtualHost>

About

Dockerized apache with mod_proxy_ajp enabled.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 67.1%
  • Shell 32.9%