Nginx config was overwritten independently

Today, all nginx.conf for all sites were overwritten with default data (from the template?):
/home/user/conf/web/site1.ru/nginx.conf
/home/user/conf/web/site2.ru/nginx.conf

/home/user/conf/web/site.ru/nginx.conf

How could this happen? I didn’t touch anything myself

There was an upgrade last night. Looks like it might have run a v-rebuild-web-domains for all users.

how to disable v-rebuild-web-domains without my knowledge

You’re not really meant to edit those template files, for this exact reason, and it does say so at the top of each template file.
If you want to make changes to the nginx config, then the recommended way of doing it is firstly to use override files eg
nginx.conf_myconfig
nginx.ssl.conf_myconfig

If you can’t make your changes that way, then you’ll need to make your own template, and then select it from the control panel.

I created my nginx templates and specified them in the site settings. But then I changed the nginx configs themselves manually in /home/user/conf/web/site1.ru/.
I don’t want v-rebuild-web-domains to happen without my knowledge

Я создавал свои шаблоны nginx и указывал их в настройках сайта. Но затем изменял сами nginx-конфиги в ручную в /home/user/conf/web/site1.ru/.
Я не хочу, чтобы происходил v-rebuild-web-domains без моего ведома

We overwrite the config every update and we clearly state it in the existing templates to not make changes…

So create your own custom templates and the should remain working…

Honestly, I think we cant state it more clearer than this on EVERY template file:

Follow the referenced docs and use your own templates, then you’ll be fine.

2 Likes

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