this post was submitted on 08 Oct 2023
5 points (100.0% liked)

Self-Hosted Main

516 readers
1 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

For Example

We welcome posts that include suggestions for good self-hosted alternatives to popular online services, how they are better, or how they give back control of your data. Also include hints and tips for less technical readers.

Useful Lists

founded 2 years ago
MODERATORS
 

I have a little dilemma. I recently upgraded to a more powerful server and created a new subdomain new.example.com for my latest project. It uses Docker. The problem is that my two other websites example.com and shop.example.com cannot run when the new one is running, as I must kill all processes on port 443 to allow Docker to occupy it... I have tried to move Apache to port 8443, but it isn't making a difference. I have also tried to relax Cloudflare SSL settings to Flexible, however this just leads to other errors.

I either get redirects to the new subdomain or it gives 521 errors.

Can anyone help? I'm relatively new to self hosting and I am clueless.

top 2 comments
sorted by: hot top controversial new old
[โ€“] [email protected] 5 points 1 year ago

You need a reverse proxy container, one that can listen on 443 and direct requests to the appropriate container.

I'm a fan of Traefik for docker scenarios. It's a little complicated compared to something like nginx, but is indirectly flexible and powerful.

Here's my config as a starting point, the docs for Traefik are pretty good.

[โ€“] bouncychicken 2 points 1 year ago

You need to expose your docker container on another port, and route traffic to that subdomain to your docker container locally through NGINX or Apache