However, it was mentioned that the settings will get wiped out with upgrade. How to keep it working? Why it is not being added natively with WordPress script installation?
I was about to write the same thing. I use virtualmin with nginx for years and the only solution to that is to manually edit each site and add the above segment to nginx. I avoid to upgrade.
Tried using a new vps with almalinux 9 which seems to have less issues. However i don’t see separate .conf file path for each domain with this system
/etc/nginx/sites-available/
All i see a single nginx.conf which have the rules for domains. i can use above code which may work globally for all domains but what about the subfolders? this following code need to be added for each?
here /wordpress is the folder.
Remember that this modified nginx.conf will reset with the upgrade so that is the another issue.
wonder if the official devs help with this.
Probably not useful here, but I just wanted to say, after working with nginx and wordpress I’ve gone back to apache. If you have additional users / sites Nginx becomes a pain in the ass. At least… for me it just caused problems and I got tired of workarounds.