Nginx fails to start for readonly filesystem

i am trying to configure nginx but by default it creates some directories at location /var/lib/nginx , /etc/nginx

enter image description here

i am looking for nginx to create these directories at a different location eg /tmp other than /var/lib , as /tmp is mounted as a different volume in the setup which i have currently where the filesystem is set to be readonly and when the filesystem is set to be readonly nginx fails with the error unable to mkdir()

How can i configure nginx to do so ?

i am able to add locations for access , error , body , fastcgi , scgi and uwsgi

enter image description here

Here is my conf file

enter image description here

which has been modified to

enter image description here

Вернуться на верх