The only thing I do was
mv test.php betterName.php
no permission changes, nothing changed. Them rename in the NGINX configuration... FROM
location @rule {
rewrite ^rule([a-z0-9]+)$
/test.php?obj=$1 last;
}
TO
location @rule {
rewrite ^rule([a-z0-9]+)$
/betterName.php?obj=$1 last;
}
and service nginx restart.
It is magic: when I "undo" the rename process, mv betterName.php test.php and back old location, all working fine again.
Using fresh UBUNTU 16 LTS with fresh NGINX.
NOTES
The real-life conf-nginx-script that I am using seems,
server {
server_name etc.etc;
access_log /var/log/nginx/etc.etc.access_log;
root /var/www/etc.etc/;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ @idResolver;
}
location ^~ /issn {
try_files $uri @issnResolver;
}
location @idResolver {
rewrite ^/?([a-zA-Z0-9\-]+)/?$
/index.php?obj=$1 last;
}
location @issnResolver {
rewrite ^/?issn[/:]?([xX0-9\-]+)[/:]?([a-zA-Z0-9]+)$
/test.php?obj=$1&cmd=$2 last;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
} #end server
... More real-life dumps for @RichardSmith comment:
ll /var/www/etc.etc/
drwxr-xr-x 7 www-data www-data 4096 Feb 15 09:41 ./
drwxr-xr-x 4 www-data www-data 4096 Feb 9 09:07 ../
-rw-rw-r-- 1 www-data www-data 5860 Feb 14 21:04 index.php
-rw-rw-r-- 1 www-data www-data 291 Feb 15 09:24 test.php
And real-life name is issn_resolver.php, so I do mv test.php issn_resolver.php.
test.phpis mentioned in your configuration files? Your regular expression as written will not match any URIs.N, I copy/paste the full conf, see edited question.grep test./issn...lsdumps.