Multi Website Hosting

Hi im very new to this. i have tried and failed to run nginx and other docker reverse proxies with complete failures. but it seems traefik seems to have loaded correctly on the root domain actually giving me a 404 error. so progress? now im no docker/linux coder and im not the best at command line. im more of a put things in config files and let it run web dev. except it seems there is no clear way since all the examples and things are separated and i get completely lost since there is no files that say this "domain = this path on server" visit site and its magically there. its not clear to me.

so heres my conundrum i have multiple websites i want to self host and cant seem to find the correct documentation or my brain keeps missing it somewhere. (yes ive read pretty much everything its all scrambled mess to me) no prebuilt files for me to follow or edit.

so heres what im trying to do. domain names root access to file system. aka "dumbdomain.com" sees a root folder preferably in a directory structure. something like

domains viewed on browser example =  "dubdomain.com, whydomain.com, etc."

folder structure
/www/website1 = "https://dumbdomain.com"
/www/website2 = "https://whydomain.com"

all port "80" redrected to https port "443" for ssl

"https://dumbdomain.com" = static html page
"https://whydomain.com" = php website using mysql database

and so forth for 4+ domains but all i can find information on for all these reverse proxies are subdomain.domain.com and i dont need subdomains i need the root domain pointed to a folder. also some of the root domains pointed to a mysql docker database.

yes the mysql and traefik is on the same custom network.


all domains will be proxies thru cloudflare as my ip is dynamic. and i dont seem to figure out how to get ssl cert from cloudflare instead of the letsencrypt.

perhaps im not reading correctly or missing something.


is there a place that already has a bunch of these configs or templates pre-made that i can copy and edit? i have yet to find them. or they are right infront of me and im code blind to them as im new to this.

Traefik is not a web server (like Apache or nginx), but a reverse proxy, it only forwards/proxies requests to other services.

See simple Traefik example how to setup Traefik and how to place labels on a target service container for automatic Traefik Docker Configuration Discovery.

oh i understand that. i want to route the root domains to the apache server docker files. not under a subdomain. i have apache and mysql and php all setup and running able to access on local host but just need a way to route the root domain to them and i simply cannot figure out how.