Hi! I’m trying to update the nginx template for a given domain, and when changing the Proxy Template in the admin panel, I get:
Error Code: 20
The template I’m editting is the exact copy of the default.tpl and .stpl with a few changes so I can handle different server names, differently
I perform 2 edits on those files. The second edit it what throws the Error Code 20.
First, let me introduce it. I have 2 domains: domain-one.com and domain-two.com on the same VPS. I have only one domain in the Hestia admin panel, which is domain-one.com. And in the aliases section of it I add domain-two.com so the SSL certificate would be valid for it as well.
The default NGINX config handles both in the same way. But I’d like to redirect domain-one to port 8888 and domain-two to port 9999. So I create a new template from the default one (name my-template) and I have 2 server blocks, one with server_name equal to domain-one.com and the other with server_name equal to domain-two.com
Also the first one has proxy_pass to port 8888 and the other to 9999.
In the admin I set that template to the site and everything works fine. Navigating to domain-one.com gets me into the service running on port 8888 and navigating to domain-two.com, to the one on port 9999 as expected.
Now I’d like to modify the template to also allow a different hostname on domain-two. So:
domain-one.com ----> port 8888
domain-two.com ----> port 9999
myhost.domain-two.com ----> port 7777
So I added a new server bock to the template, with server_name equal to myhost.domain-two.com and proxy_pass to port 7777.
Now I get to the admin panel again, change the Proxy Template to the default one, save it, and then back to my-template and I can not save it because I get the Error Code 20. And I don’t know what it means. If I delete the latest added server block of the template, the error is gone. So I guess there’s something wrong with my configuration in the template.
Thank you!