Skip to content

Latest commit

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Web proxy

This is a apache2 config generator for docker containers.

It's based on container labels :

LabelDescriptionDefault valueExample
webproxy.subdomainthe subdomain to use (app.example.com)undefinedapp
webproxy.paththe path to use (example.com/app)undefinedapp
webproxy.portthe internal port to uselowest port8080
webproxy.serveradminthe server admin emailundefinedtest@example.com
webproxy.websocketsif the container use websocketsfalsetrue
webproxy.affinitycookieto keep user on the same serverundefinedPHPSESSID
webproxy.customadd custom configurationundefinedHeader set Blabla "blabla"

If no label starting with webproxy. is defined, the container will not be proxied.

Also some environment variables can be set and/or put in a .env file :

Environment variableDescriptionDefault valueExample
TOPDOMAINthe top domain to uselocalhostexample.com
HTTP_PORTthe port to listen to http requests808080
HTDOCS_DIRECTORYthe directory to serve default static files./htdocs/var/www/html
DEFAULT_REDIRECT_TO_TOPDOMAINif redirect all unknown subdomains to the top domainfalsetrue
REDIRECT_TO_SECUREif redirect all http requests to httpsfalsetrue
IGNORE_PATHSpaths to ignore when proxying on top domainundefinedapp,data
CUSTOM_CONFIGadd custom configuration to the generated configurationundefinedHeader set Blabla "blabla"

See docker-gen for more explanations.

See also Apache HTTPd documentation if you want to add more configuration in the template.

About

Automated Apache HTTPd proxy for Docker containers using docker-gen

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages