i have a custom domain purchased and is synced with cloudflare.
I have portainer running multiple containers…
I have spinned up few php websites on the portainer…
now each container has the same ip as that of the portainer with different ports.
currently i am creating a seperate entry for each subdomain in cloudflare tunnel and assigning seperate ip:port for that.
I was curious if i can create lets say container php has webroot folder at /home/www and then there are 3 folders A B C for 3 websites now i want to configure cloudflare so that
what i am trying to achieve is that instead of creating so many containers for individual webservers, i can create just one container and create different folders for each website and put the path in the tunnel config.
in other words, I want to add relative path after the port number when specifying the url
please let me know if i am thinking in the right direction and if this can be done??
i am using portainer for docker containers
using php:apache image
i have a base folder named ~/www and have multiple folders for different websites (lets say A B C)
so website A has root folder as ~/www/A and similarly for rest of the websites
Website A has FQDN on cloudflare as subdomainA.domain.com and similarly for rest of the websites
presently, i am running individual containers of php:apache for all the websites and pointed the root folder to corresponding location. each container has same IP as that of portainer and using different ports. so website A has 8080:80, B has 8181:80 and so on.
what i want to know is it possible that
i create virtual hosts in apache and specify seperate subdomains for each entry?
option in cloudflare to provide seperate path for each subdomain entry?
PS: i do not want same domain for all websites and just to substitute the leading link with “/” like domain.com/A or domain.com/B