Reverse proxy and port redirection

How do i proxy to another port like https://34.324.34.34:4432

1 Like

You can create a new template in /usr/local/hestia/data/templates/web/nginx/

You will see
https://github.com/hestiacp/hestiacp/blob/master/install/deb/templates/web/nginx/default.tpl

and default.stpl

cp default.tpl new_name.tpl

repeat the same for *.stpl

Then you can modify your tpl files

location / {
    proxy_pass      http://%ip%:4432;
    location ~* ^.+\.(%proxy_extentions%)$ {
        root           %docroot%;
        access_log     /var/log/%web_system%/domains/%domain%.log combined;
        access_log     /var/log/%web_system%/domains/%domain%.bytes bytes;
        expires        max;
        try_files      $uri @fallback;
    }
}

If you have NGiNX + PHP-FPM but no Apache2 installed the files are located in the php-fpm folder

/usr/local/hestia/data/templates/web/nginx/php-fpm

2 Likes

okay so there is no solution in the panel its manual thanks

1 Like

shouldn’t it be fairly easy to add the ability to add a port in the web domain settings?

See Nginx custom proxy (feature request) · Issue #1453 · hestiacp/hestiacp · GitHub

Personally i use hestiacp for personal websites.

I found it easier to run proxy manager infront of hestacp to redirect traffic to another service such as gittea or something and just update it when i add a new domain.

Can not wait until you can do this in the panel will save having to have docker installed etc.