So I am 100% new to icinga and fairly new to the whole CentOS/linux adventure. I have setup things on centOS for work before, but a lot of that were guide setup processes of (semi-) enterprise grade softwares.
That being said I am trying to setup icinga2 and icingaweb2 and I just cannot get this to work. I am pretty sure it has something to do with the webserver but I can’t for the life of me find out what step I skipped. I have followed the docs, followed 3 other icinga on centos8 guides and the result is the same.
Basically when I am supposed to go to icingaweb2/setup I get this
{urlPath}/error_unavailable.html or This page can not be found.
if I go to the IP of my server I get the apache test page so it looks like I am missing some step/part that makes apache actually serve the icingaweb pages?
In the httpd error log I get something like this:
[Sun Nov 08 10:06:25.665099 2020] [proxy:error] [pid 50308:tid 140150844241664] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
[Sun Nov 08 10:06:25.665128 2020] [proxy_fcgi:error] [pid 50308:tid 140150844241664] [client 10.0.0.50:54634] AH01079: failed to make connection to backend: 127.0.0.1
[Sun Nov 08 10:06:59.389859 2020] [autoindex:error] [pid 50308:tid 140150646449920] [client 127.0.0.1:60172] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive
So I assume that’s where the problem sits but I am not sure how to troubleshoot that. Any help?
I have put selinux in permissive mode and I think since it can show me the test page of apache the webserver itself is not being blocked?
Anyway I tried to follow the docs you linked (3 times ), but the part you refer to is a bit confusing to me. As far as I can see the last part that is relevant to CentOS 8 is
And everything after that except for generating the token is for CentOS 7, but that whole paragraph was a bit confusing to me cause as you said I feel like I at no point told httpd to show icingaweb2. Anyway I have uploaded the 2 files you referred to. Let me know if you can see something relevant.
I will be afk for a couple hours now but I will check back later. Again, thanks for having a look.
I strongly suggest setting back SELinux to enforced. The boolean I have listed will allow Apache make outbound communications - in this case, it would allow httpd to connect to php-fpm.
The reason the Apache test page is loading is because it is raw HTML and would not need to communicate to php-fpm or other additional services.
I’ve had a look at the config and as suspected there is no VirtualHost entry for Icinga Web - is there additional config under /etc/httpd/conf.d? If not, you may need to create a config for Icinga Web - here’s a config example:
It also appears your php-fpm config is listening on a unix socket (/run/php-fpm/www.sock) and not on 127.0.0.1:9000, so you may need to adjust your Apache config to use the socket, or adjust php-fpm to listen on an IP and port.
And then I also added the contents of icingaweb2.conf to httpd.conf. And now I get the setup page to work !
Thanks a lot for the help. Especially the part of having to put that conf in the httpd.conf file I did not get at all from the install guide But well I am not exactly familar with webservers
It’s up to you where you put the contents for the Apache VirtualHost block - I like to keep mine in seperate files and use the include directive.
You will likely see this in a lot of Linux applications, where there is a main config file, and a child folder called conf.d - some versions of httpd use sites-available and sites-enabled folders.