Saturday, April 03, 2021

Re: icinga-web2 & httpd(8)

On 2021/04/03 11:11, Florian Obser wrote:
> Nice this works for me, too.
> Thank you very much.
>
> sthen: OK to add it to the README?

I'd like to have it working with the same path as the other example
configurations (/icingaweb2 rather than in the root) so that the
configs are interchangeable with other servers, can you use this
instead please?


location "/icingaweb2/*.php*" {
root "/icinga-web2/public"
request strip 1
fastcgi socket "/run/php-fpm-icingaweb2.sock"
fastcgi param ICINGAWEB_CONFIGDIR "/etc/icingaweb2"
}

location not found "/icingaweb2/*" {
request strip 1
request rewrite "/icingaweb2/index.php?$QUERY_STRING"
}

location "/icingaweb2/" {
directory index "index.php"
}


> +An example for httpd (remember to "rcctl reload httpd" after adding),
> +using the above php-fpm section:

And please use "base httpd" or "OpenBSD httpd" to distinguish between
the two unfortunately-similarly-named daemons ;)

> +
> + root "/icinga-web2/public"
> + directory index "index.php"
> + location "*.php*" {
> + fastcgi socket "/run/php-fpm-icingaweb2.sock"
> + fastcgi param ICINGAWEB_CONFIGDIR "/etc/icingaweb2"
> + }
> +
> + location not found "*" {
> + request rewrite "/index.php?$QUERY_STRING"
> + }
> +
> For Apache httpd, configuration files are provided in
> ${PREFIX}/conf/modules.sample that can be symlinked to ${PREFIX}/conf/modules.

No comments:

Post a Comment