Using redirects.map

I have a redirects.map file (nginx compatible).
What’s the best way to use it in a domain I created via Hestia Panel?
(Ubuntu 22.04, Nginx)

I solved my problem.
I included the redirects.map file in nginx.ssl.conf.

did you edit that file directly?

maybe while on it, you should have read the UPPERCASE line in the header? :wink:

Yes, you’re right, thank you.
So, I am asking my question again :slight_smile:

You have two options:

1.- Instead of modifying nginx.ssl.conf, you can create a new configuration file named nginx.ssl.conf_redirect-map containing the contents of your redirect.map. This file won’t be overwritten when the web domain is rebuilt. However, depending on your redirects, it may not work as expected because the new configuration file is loaded at the end.

2.- You can create a custom web template and add your configuration directly to it. Once the template is created, you can assign it to your domain. The custom template will not be overwritten either.

Thank you @falzo , @sahsanu.

I tried the first option. But as you mentioned, the extra configs are included at the very end and within the server block. That’s why it didn’t work as I expected.
I’ll try the second option. Let’s see if I can do it.