MAAS nginx config

Hi,

I am attempting to modify the Nginx configuration file in MAAS located at:

/var/snap/maas/current/http/nginx.conf

Specifically, I want to change the client_max_body_size parameter. However, when I restart MAAS, the configuration resets to its previous state.

Could you advise on how to make this change persist?

Hey,

The file you are modifying is replaced at every restart by the original configuration from the snap so you can’t do it out of the box.

The snap is a readonly filesystem so you can’t modify it. However on the web there are some instructions to unpack, modify what you need and repack the snap. The file you need to modify in the snap is at /usr/share/maas/nginx/nginx.conf. Of course as soon as you upgrade to a new version and you change your snap you’ll lose your patches

Hi,

I have seen similar solutions online, but your suggested file doesn’t exist or the nginx directory. I tried a similar solution to yours but don’t see it applied.

I tried to add /usr/share/maas/nginx/nginx.conf, but I don’t see any change.

You can check the steps here Rebuilding MaaS snap : [Errno 111] Connection refused . Once you unsquash the snap you’ll find that path in the directory