> Am 09.04.2021 um 18:55 schrieb Florian Obser <florian@openbsd.org>:
>
> This is awkward, it basically takes over the (virtual) server, so it's
> not a snipped that you can just add to your existing config.
I agree. I didn't really had this in mind while testing the config. I just modified it slightly so there's no top level root declaration:
location "/icingaweb2/*.php*" {
root "/icinga-web2/public/"
request strip 1
fastcgi socket "/run/php-fpm-icingaweb2.sock"
fastcgi param ICINGAWEB_CONFIGDIR "/etc/icingaweb2"
}
location found "/icingaweb2/*" {
root "/icinga-web2/public/"
request strip 1
}
location not found "/icingaweb2/*" {
root "/icinga-web2/public/"
request rewrite "/icingaweb2/index.php?$QUERY_STRING"
}
The trick just seems to be to first match for existing files and then handle the 'not found' ones. Seems to work so far, at least I didn't notice any 404s or empty responses.
No comments:
Post a Comment