Directadmin overwrites my custom Nginx vhost config

gnex

Verified User
Joined
Oct 1, 2012
Messages
10
Hello,

I use Directadmin with Nginx and PHP-FPM. I have some websites and there need different nginx configuration for pretty urls. When I write my changes directly to /usr/local/directadmin/data/users/user/nginx.conf and restart nginx all work OK. Problem is when I do any change in Directadmin - my file was overwritten..

I know about /usr/local/directadmin/data/templates/custom but i need different configuration for each domain - not one config which work well on all websites.

Anyone can help me with this problem? How do different nginx config for websites without restore default nginx template?
 
Hello,

Set the file immutable with the following command:

Code:
chattr +i [COLOR=#333333]/usr/local/directadmin/data/users/user/nginx.conf[/COLOR]

That will protect it against being overwritten.
 
I know this command but you don't think that it is very... primitive?
 
Back
Top