Hello, how can I specify a specific port for each domain. Because I only install it on a local server.
So that the domain can be accessed with the local server IP on a specific port. For example:
Domain1.com = 192.168.100.5:1020
Domain2.com = 192.168.100.5:1030
Domain3.com = 192.168.100.5:1040
And so on. I will put my local website online using cloudflare tunneling which will call localhost:port
Previously, I did not understand how the settings work, what is a template in HestiaCP, please help.
It would be nice in the future to be given the option to add a listen port in the domain creation options
How should I set it so that the local website can be accessed on different ports so that it does not collide
eris
June 24, 2025, 10:23am
2
You can just use 192.168.100.5:80 and Nginx will handle it with the correct routing …
I’ve tried it but it still doesn’t work, because my server is local and doesn’t have a public IP. I can only call via local IP then custom port. Then Cloudflare can access it via Tunneling on my Ubuntu with localhost:CustomPort
I’ve tried it on several panels and it works well, but I’m confused about where to set it in HestiaCP. In which template. I’m still a beginner at Hestia
eris
June 24, 2025, 10:58am
4
This method is not supported with Hestia ..
1 Like
I succeeded in other Panels by simply adding
Listen 0.0.0.0:port
to the template of each domain. I am sure it can be done in Hestia but I am still confused about which template concept I should edit
linkp
June 24, 2025, 2:37pm
6
Just use hostnames. Using non-standard ports for HTTP traffic is an exercise in pointless frustration and not how things are meant to be done.
please tell me, in which template should I add the custom port so that it can be called with IPlocal:port
I MADE a new .tpl template by copying the default file and editing the top like this and have added the port in IPtables but it still doesn’t work. please help
server {
listen %ip%:1020;
listen %ip%:1020;
listen 0.0.0.0:1020;
server_name %domain_idn% %alias_idn%;
and
<VirtualHost %ip%:1020>
ServerName %domain_idn%
%alias_string%
ServerAdmin %email%
DocumentRoot %docroot%
I want the web that I created to be able to be accessed in a browser with the local server IP and custom port
such as
http://192.168.100.28:1020
Please help