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

https://yforms.ouvm3.it-wiz.de:3005/api

to URLs like:

https://yforms.ouvm3.it-wiz.de/api

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:

and

rename them to:
whatyouwant.tpl and whatyouwant.stpl

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

to

proxy_pass http://%ip%:portyouwanttouse;

2 Likes

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:
/usr/local/hestia/data/templates/web/nginx/

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.