without success…
it seems as if the static location block catches all and presents the
raw php source to me now…
while i thought that my regex which should match requests to domain.com/phpmyadmin/index.php exactly
what would be the best practice to serve stuff like this? alias?
rewrites? regex? try files?
thanks for your swift reply, actually that’s not exactly what I meant:
there is two directories for dynamic content (php):
default:
/var/www/nginx_default/ or similar
which will usually work for your code above (catching all urls ending
with .php)
with the SCRIPT_FILENAME path set to the right dir
but then there is another one:
/usr/share/phpmyadmin/
that i want to make available to everybody (on the same domain)
under the url: anydomain.com/phpmyadmin/
these will also match .php$ but should get directed to the phpmyadmin
directory
I used this regex:
location ~ ^/phpmyadmin/(.*)(.php)$
to catch it but it won’t work like expected…
i am now doing a workaround with a subdomain: phpmyadmin.anydomain.com
which can be cought in the server block by the domain name
so i can set root directory to /usr/share/phpmyadmin
but i am still not satisfied with this as it involves changing the NS
entries
while a “subfolder” will be much easier to setup
any help very much appreciated (not to say needed, hehe)
then getting /t/env.php shows the output of the file
/usr/local/nginx/html/t/env.php; while getting /a/env.php shows the
output of the file /tmp/a/env.php.
Exactly as I’d expect.
I used this regex:
location ~ ^/phpmyadmin/(.*)(.php)$
to catch it but it won’t work like expected…
As above, it works for me.
For each request, exactly one location is used. What does “grep location
nginx.conf” show? It will hopefully show the various location blocks you
define, in order.
That, plus the http request you make, should let you determine which
location block is being used. (Or you could just look in the debug log.)
If it’s not what you want, then you can configure things differently.