Allow internal redirect to URI x, but deny external request for x?
J. Lewis Muir
jlmuir at imca-cat.org
Fri Aug 30 18:37:43 UTC 2019
On 08/30, J. Lewis Muir wrote:
> I'm wondering if the fastcgi_split_path_info function or the if
> directive is what's emitting the file op message in the error log which
> would mean that one or both of $realpath_root or $fastcgi_script_name
> are not set to what I expect. (?)
Adding
return 200 "document_root: $document_root\nfastcgi_script_name: $fastcgi_script_name\n";
to the location like this
location ~ ^/my-app/(.*?[^/]\.php(?:/.*|$)) {
alias /srv/www/my-app/current/$1;
return 200 "realpath_root: $realpath_root\nfastcgi_script_name: $fastcgi_script_name\n";
}
yields the following:
$ curl http://localhost/my-app/
realpath_root: /srv/www/my-app/releases/1.0.2/index.php
fastcgi_script_name: /my-app/index.php
So, that doesn't seem right! I was expecting them to be something like:
realpath_root: /srv/www/my-app/releases/1.0.2
fastcgi_script_name: /index.php
Puzzled,
Lewis
More information about the nginx
mailing list