Skip to content

Instantly share code, notes, and snippets.

View adriansteffan's full-sized avatar
🐕

Adrian Steffan adriansteffan

🐕
View GitHub Profile
@adriansteffan
adriansteffan / map-domain-to-docker-container.md
Last active January 6, 2024 16:06
A description of how to map a specific domain to a webservice running inside a docker container. Used as personal documentation.

Apache Config: map domain to docker container

The goal: Make the webservice hosted inside a docker container available through a specific domain that we own (let's say mycooldomain.com - keep in mind to replace this placeholder name with your actual domain in EVERY instance).

For this to work on a standard linux distro, apache and certbot need to be installed. Additionally, a need a specific set of apache modules need to be enabled for this to work.

sudo apt install apache2 certbot python3-certbot-apache
a2enmod proxy
a2enmod proxy_http