I trying to install icinga2/icingaweb2 in a FreeBSD jail.
after using icingacli to generate the nginx config. I try to run the icingaweb2/setup. Bad luck my log return an error: /usr/local/www/icingaweb2/public/css/icinga.min.css" failed (2: No such file or directory)
For sure, the css format is LESS. But I can figure how to tell to nginx to use the less format? Did I need to recompile it with the right option? Something in the configuration file ?
For now, it’s very frustrating…
Thanks in advance for any advice, help or pointer you can send to me.
you don’t have to compile anything for Icinga Web 2 to work. Yes, Icinga Web 2 uses LESS but this is transparently compiled to CSS. The thing is however, that the compiled CSS is not stored in Icinga Web 2’s installation path. So the path /usr/local/www/icingaweb2/... is not correct.
The URL the browser accesses the CSS by is /icingaweb2/css/icinga.min.css but that doesn’t relate relatively to /usr/local/www/icingaweb2/ but to a temporary file location. The default path (in a non-jail env) is /tmp/FileCache_icingaweb/.
Besides, that’s also used for JavaScript, so consider allowing access to the entire directory.
This “something” would be Icinga Web 2. Nginx does not need to know the path neither does it get a false one from anything else.
I don’t know how you installed Icinga Web 2 or what FreeBSD is using here.
It’s the temporary file location for your environment where PHP is running on. I don’t know anything about FreeBSD jails, but it’s usually directly under /tmp, so there must be a similar path for a FreeBSD jail application?
Anyway, maybe you just got your web server configuration wrong, as nginx itself does not need to open any css file of Icinga Web 2. Nginx only needs to be able to access the public directory and therein the index.php file to which any request should be sent. (No matter if it’s a real file or not)
No. You don’t need less.js. You have to configure your webserver properly.
You seem to be installing Icinga Web 2 for the first time from source. Are you following the official documentation? We don’t cover FreeBSD there, but most instructions can be applied 1:1.
There you’ll get a nginx configuration like this:
location ~ ^/icingaweb2(.+)? {
alias /icingaweb2/public;
index index.php;
try_files $1 $uri $uri/ /icingaweb2/index.php$is_args$args;
}
Adjust it so that it matches your environment (paths, etc) and you don’t have to worry about LESS at all.