I have a server using HestiaCP (Apache + Nginx) which has 2 registered domains (e.g foo and bar). The second domain (bar) is a CMS platform where users may have their own custom domain.
When visiting foo or bar, I can see the hosted pages, as expected.
Now, let’s assume that another person wants to forward his/her custom domain (custom.com) to that CMS (bar) and, creates a CNAME record pointing it to “bar”. Checking it with a CNAME lookup shows that everything is fine.
But, when visiting custom.com in the browser, shows a standard “success” page (with a huge checkmark) that seems to be presented to the visitor whenever the domain is not registered in HestiaCP!
So, my understanding is that Nginx is catching the request and redirecting to the “default server” before it reaches the “bar” domain so, there are no logs for that domain!
Is it possible to change that behavior? How could I change that?
Hey, @Raphael ! Thank you for the quick reply. 🙇♂️
I managed to accomplish what I was aiming for by playing with the default server config. For that, I’ve made a small change in the nginx proxy_ip.tpl template, as follows, rebuilding the domains later:
Hi @rogerio , I have a similar use case and you gave me the solution! I was searching for hours for that catchall nginx proxy template. Without Hestia I new exactly what to do, but now I wanted to go inline with Hestia rules because I started to love this CP! Thank you!