cloud-from-scratch icon indicating copy to clipboard operation
cloud-from-scratch copied to clipboard

Add instructions for subdomains

Open alexjmccoy opened this issue 5 years ago • 1 comments

I think it would be fairly easy to add Caddy instructions for reverse proxying subdomains, i.e. nextcloud.domain.com for the various Docker containers. I'm researching this now so I might be able to contribute but I figured I'd get the issue going.

Thanks for the great project!

alexjmccoy avatar Jul 21 '20 17:07 alexjmccoy

Yes, good idea, what do you have in mind? Caddy does have on the fly "on_demand" https mode..

*.example.com {
	tls [email protected] {
		on_demand
		}
	}

I'm thinking something like.. On your EDGE NODE

Edit Caddyfile

$ vim ~/Caddyfile

nextcloud.example.com {
	tls [email protected]

	reverse_proxy 10.1.1.2:80
	}

On your LOCAL NODE

Edit Caddyfile

nextcloud.example.com:80 {

	reverse_proxy nextcloud:80
	}

Eventually it would be good to make a full nextcloud container instruction section.

Started a md doc here.. https://github.com/technomada/cloud-from-scratch/blob/master/more/subdomains.md

Thanks for the kind words!

technomada avatar Jul 21 '20 17:07 technomada