I'm trying to set up a VPS with a single IP address to run my static homepage and some additional services such as NextCloud. I already have a domain that points to the VPS's IP address. Reading through a number of tutorials on self-hosting, a common solution for this type of scenario is to set up a reverse proxy that forwards to different subdomains, e.g. nextcloud.mydomain.com. However, here's my question:
How can I run my static homepage under the main domain, while having services run under subdomains?
All examples I have seen so far serve static content under another subdomain, e.g. blog.mydomain.com. That's not exactly what I want. In fact, I wonder what the response of the reverse proxy is when I try to access the main domain.
I'm using docker and docker-compose for managing the VPS. So far, I tried the jwilder/nginx-proxy
and traefik
images as reverse-proxies. Any help (literature, relevant tutorials, github repos, etc.) would be highly appreciated!