Open mqudsi opened 5 months ago
@mqudsi Thanks for reporting this. Can you please provide your Unit routes
configuration? That would be great. We will make sure we will look into this. I have some quite large configuration and I just want to make sure I can see your routes configuration before sharing any more information.
Presently, including a
script app.php
in a nginx-unit php application's definition causes any requests to that app to executescript
, ignoring$uri
andindex
.This causes a problem for a lot of configurations where virtual paths are used in the same namespace (prefixed path) as physical php files, e.g. given the following directory tree, there is no way to service all of the following requests without pre-enumerating all possible directory names or all possible filename patterns:
*.php
andpass
it toapplications/php/direct
to get URLs like/dir1/index.php
and/dir1/script.php
to workshare
with/path/to/app-root/
to load static files withtypes: [ "!*/*php" ]
, and setfallback
toapplications/php/main
which handles requests like/static-file.css
and virtual paths such as/this/path/isnt/real
that need to be mapped to/main.php
/app-root/dir1
or/app-root/dir1/
becausescript
overrides both$uri
andindex
, meaning both those requests will be mapped to/app-root/main.php
and not/app-root/dir1/index.php