Upgrade script : should it rewrite nginx conf file totally?

I have to bring slight changes to an app nginx config file with an upgrade script, what is best practice ?

  1. regenerate the app nginx conf file totally (like on install, dropping any customization)
  2. trying to tweak it with some search/replace

I’d be in favor of 1. (less hackish and fragile), but I don’t know if customizing nginx conf files is common (I hope not :-p).

In my experience, I’ve always implemented/seen option 1 :wink:

1 Like