On Sat, Apr 03, 2021 at 12:28:56PM +0100, Stuart Henderson wrote: > 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?
Makes sense, I missed that. However, your config doesn't quite work. For example, requesting /icingaweb2/img/icinga-logo-big-dark.svg results in http 200 with Content-lenght: 0. Sprinkling more root and request strips doesn't seem to help :/ I suspect the "not found" isn't working correctly. I'm out of ideas for now. Maybe Michael or you have an idea. It's also possible that httpd(8) just can't do it? > > > 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 ;) There can be only one! > > > + > > + 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. > -- I'm not entirely sure you are real.