It does not have to be with Nginx, actually editing the file on the machine does not have to be with servers.
The problem of asking "password" is that the folder that these php scripts are do not belong to your linux user, this is a problem of your understanding about linux.
Linux is not equal to Windows, you first need to understand what groups, user and permissions are, but I will not go into details
The quick solution is to change the folder where the files are, by changing nginx.conf
, search for something like root /var/www
(or similar) and adjust it to a folder where you have user access, for example, in the% a folder named /home/usuario
and edit /home/usuario/www
, it looks something like this:
server {
listen 80;
server_name localhost;
root /home/usuario/www;
Restart Nginx after saving changes from root
Now start writing your scripts within nginx.conf