0

I am recently upgraded Ubuntu Server 20.04 to Ubuntu Server 22.04. It is a LEMP server running the latest Mainline version of Nginx. After the upgrade, when I try modifying the /etc/nginx/nginx.conf file with nano editor, nano shows a warning in red that says

/etc/nginx/nginx.conf is meant to be read-only

What is this error about, and since when is my nginx.conf file meant to be read-only? Is this an nginx issue, a nano issue, or a filesystem permissions issue, or all of the above? What can I do to fix this error? Please see screenshot below.

Nginx.conf is meant to be read-only

DanRan
  • 73
  • 1
  • 3
  • 22
  • What permissions are on /etc/nginx/nginx.conf file? (`ls -ld /etc/nginx/nginx.conf`) From which user are you using `nano`? (`id`) Is it `root`, do you use `sudo`? – Mircea Vutcovici Aug 29 '23 at 02:53
  • So, in the end you will find it is never a good idea to put all sites in a single config file, so you won't edit `/etc/nginx/nginx.conf` much. Examples can be found in https://webdock.io/en/docs/how-guides/shared-hosting-multiple-websites/how-configure-nginx-to-serve-multiple-websites-single-vps It's not an issue, but more like a best practice embraced by many production web server administrators. – Lex Li Aug 29 '23 at 03:11

0 Answers0