Skip to content

Instantly share code, notes, and snippets.

View radulle's full-sized avatar
🏠
Working from home

Nikola Radulaški radulle

🏠
Working from home
  • Belgrade, Serbia
View GitHub Profile
@radulle
radulle / README.md
Created December 28, 2022 22:43 — forked from vukhanhtruong/README.md
Multiple WordPress Sites on Docker with Letsencrypt

Host Multiple WordPress Sites behind Nginx Proxy

With the following “Docker recipe”, you will set up a Docker node running separate WordPress installation on two domains or subdomains. This setup is pretty much production ready, with:

  • nginx reverse proxy by Jason Wilder that automatically routes traffic to new containers that are created with the VIRTUAL_HOST=sub.domain.com environment variable. This nifty container performs a similar function to Traefik or HAProxy, but it is amazingly simple to use.
  • letsencrypt-nginx-proxy-companion by Yves Blusseau that obtains an SSL certificate from Let’s Encrypt, the free Certificate Authority, when you specify the LETSENCRYPT_HOST and LETS_ENCRYPT_EMAIL environment variables on any application container (i.e. WordPress) that needs to be served over HTTPS. The companion even pings Let’s Encrypt every 90 days to automatically renew your certificates!
  • Of