Apache PHP-FPM: rewriting URL

Hello everybody.

For an Express.js server I am trying to get HestiaCP with Apache to automatically rewrite URLs starting with


to URLs like:


In other words, the port number should get hidden.

Any idea how to go about it?

(post deleted by author)

(post deleted by author)

Easiest method is:

Create a copy of:


rename them to:
whatyouwant.tpl and whatyouwant.stpl

And modify the line:
proxy_pass http://%ip%:%web_port%;


proxy_pass http://%ip%:portyouwanttouse;


Thank you.

The files you indicated are NGINX templates.

Right now my domain uses the APACHE2 web template.

So will I place the two files in /usr/local/hestia/data/templates/web/apache2/php-fpm/ or in one of the following two locations?

You will need:

Folder and then update the “Proxy template”

It worked. Thank you very much.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.