# Seem to be missing a step in the setup

**URL:** <https://community.icinga.com/t/seem-to-be-missing-a-step-in-the-setup/6005>\
**Category:** Icinga Web\
**Tags:** centos-8, icingaweb2\
**Created:** [November 8, 2020, 9:33am UTC](https://community.icinga.com/t/seem-to-be-missing-a-step-in-the-setup/6005 "2020-11-08T09:33:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thustra](https://community.icinga.com/letter_avatar_proxy/v4/letter/t/3ab097/32.png) [@Thustra](https://community.icinga.com/u/Thustra)\
**Post date:** [November 8, 2020, 9:33am UTC](https://community.icinga.com/t/seem-to-be-missing-a-step-in-the-setup/6005/1 "2020-11-08T09:33:48Z")

</div>

Hi,

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?

---

<div class="post-metadata">

**Author:** ![0xliam](https://community.icinga.com/user_avatar/community.icinga.com/0xliam/32/1513_2.png) [@0xliam](https://community.icinga.com/u/0xliam)\
**Post date:** [November 8, 2020, 10:45am UTC](https://community.icinga.com/t/seem-to-be-missing-a-step-in-the-setup/6005/2 "2020-11-08T10:45:42Z")

</div>

Hi @Thustra,

Can you post your httpd and php-fpm config?

Judging from your logs, it looks like Apache is defaulting to the `/var/www/html` folder, which is empty, instead of `/usr/share/icingaweb2/public`.

It also looks like Apache is not connecting to php-fpm, in which case you might need to add the relevant SELinux rule - see `httpd_can_network_connect ` on [https://wiki.centos.org/TipsAndTricks/SelinuxBooleans](https://wiki.centos.org/TipsAndTricks/SelinuxBooleans)

The last few paragraphs of this page are also relevant for httpd + php-fpm configs:

> **[Installation - Icinga Web 2](https://icinga.com/docs/icingaweb2/latest/doc/02-Installation/#installing-the-web-server)**

---

<div class="post-metadata">

**Author:** ![Thustra](https://community.icinga.com/letter_avatar_proxy/v4/letter/t/3ab097/32.png) [@Thustra](https://community.icinga.com/u/Thustra)\
**Post date:** [November 8, 2020, 11:27am UTC](https://community.icinga.com/t/seem-to-be-missing-a-step-in-the-setup/6005/3 "2020-11-08T11:27:14Z")

</div>

[httpd.conf.txt](https://community.icinga.com/uploads/short-url/bPnl7D4bkWDw1kVTOtpYLaTLrnc.txt) (12.0 KB) [www.conf.txt](https://community.icinga.com/uploads/short-url/AjZsdDZSz4O1RsiJzFuVJbawaWn.txt) (19.4 KB)

Hey thanks for taking the time to look at this.

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

"RedHat / CentOS 8 and Fedora:

systemctl start php-fpm.service  
systemctl enable php-fpm.service  
"

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.

---

<div class="post-metadata">

**Author:** ![0xliam](https://community.icinga.com/user_avatar/community.icinga.com/0xliam/32/1513_2.png) [@0xliam](https://community.icinga.com/u/0xliam)\
**Post date:** [November 9, 2020, 3:57am UTC](https://community.icinga.com/t/seem-to-be-missing-a-step-in-the-setup/6005/4 "2020-11-09T03:57:43Z")

</div>

Hey @Thustra,

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:

> <https://github.com/Icinga/icingaweb2/blob/master/packages/files/apache/icingaweb2.fpm.conf>

Also see: [https://icinga.com/docs/icingaweb2/latest/doc/20-Advanced-Topics/#virtualhost-configuration](https://icinga.com/docs/icingaweb2/latest/doc/20-Advanced-Topics/#virtualhost-configuration)

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.

```
[www]

user = apache
group = apache
listen = /run/php-fpm/www.sock
listen.acl_users = apache,nginx
listen.allowed_clients = 127.0.0.1
pm = dynamic
pm.max_children = 50
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 35

slowlog = /var/log/php-fpm/www-slow.log

php_admin_value[error_log] = /var/log/php-fpm/www-error.log
php_admin_flag[log_errors] = on
php_value[session.save_handler] = files
php_value[session.save_path] = /var/lib/php/session
php_value[soap.wsdl_cache_dir] = /var/lib/php/wsdlcache
```

---

<div class="post-metadata">

**Author:** ![Thustra](https://community.icinga.com/letter_avatar_proxy/v4/letter/t/3ab097/32.png) [@Thustra](https://community.icinga.com/u/Thustra)\
**Post date:** [November 9, 2020, 6:30pm UTC](https://community.icinga.com/t/seem-to-be-missing-a-step-in-the-setup/6005/5 "2020-11-09T18:30:51Z")

</div>

@0xliam Okay so I changed the ww.conf file to this

```
[www]

user = apache
group = apache

listen = 127.0.0.1:9000
listen.acl_users = apache,nginx
listen.allowed_clients = 127.0.0.1

pm = dynamic
pm.max_children = 50
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 35

php_admin_value[error_log] = /var/log/php-fpm/www-error.log
php_admin_flag[log_errors] = on
php_value[session.save_handler] = files
php_value[session.save_path] = /var/lib/php/session
php_value[soap.wsdl_cache_dir] = /var/lib/php/wsdlcache

```

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

---

<div class="post-metadata">

**Author:** ![0xliam](https://community.icinga.com/user_avatar/community.icinga.com/0xliam/32/1513_2.png) [@0xliam](https://community.icinga.com/u/0xliam)\
**Post date:** [November 10, 2020, 12:54am UTC](https://community.icinga.com/t/seem-to-be-missing-a-step-in-the-setup/6005/6 "2020-11-10T00:54:45Z")

</div>

No worries, glad it is working! 🙂

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.
