0

I need install mariadb, apache2, php, icinga2 and icingaweb2 on gentoo.

According to the documentation, I managed to install mariadb, apache2, (probably) php and icinga2

At the moment (according to the log) icinga2 runs without errors. However, I cannot configure icingaweb2 correctly.

Is there any documenetation/tutorial how to configure icingaweb2 in gentoo?

At this moment, I just need to get a basic HTTP setup without LDAP, just on port 80. (I will play with ssl security and domain later...)

It is not clear from this documentation where I make a mistake

https://icinga.com/docs/icingaweb2/latest/doc/02-Installation/

https://icinga.com/docs/icinga2/latest/doc/02-installation/

https://www.cs.uni-potsdam.de/~pveber/apache.html

Currently only http://localhost responds (default apache message "It Works!")

On http://localhost/icingaweb2, http://icingaweb2/icingacli, http://icingaweb2/setup etc... nothing

I don't know where must be placed icingaweb2 document root directory, if in /var/www/ or in /usr/share/icingaweb2/public/

In my /etc/apache2/vhosts.d/00_default_vhost.conf is:

##mmtest
<Directory "/usr/share/icingaweb2/public">
    Options SymLinksIfOwnerMatch
    AllowOverride None

    DirectoryIndex index.php

    <IfModule mod_authz_core.c>
        # Apache 2.4
        <RequireAll>
            Require all granted
        </RequireAll>
    </IfModule>

    <IfModule !mod_authz_core.c>
        # Apache 2.2
        Order allow,deny
        Allow from all
    </IfModule>

    SetEnv ICINGAWEB_CONFIGDIR "/etc/icingaweb2"

    EnableSendfile Off

    <IfModule mod_rewrite.c>
        RewriteEngine on
        RewriteBase /icingaweb2/
        RewriteCond %{REQUEST_FILENAME} -s [OR]
        RewriteCond %{REQUEST_FILENAME} -l [OR]
        RewriteCond %{REQUEST_FILENAME} -d
        RewriteRule ^.*$ - [NC,L]
        RewriteRule ^.*$ index.php [NC,L]
    </IfModule>

    <IfModule !mod_rewrite.c>
        DirectoryIndex error_norewrite.html
        ErrorDocument 404 /icingaweb2/error_norewrite.html
    </IfModule>





# Remove comments if you want to use PHP FPM and your Apache version
# is greater than or equal to 2.4
#    <IfVersion >= 2.4>
#        # Forward PHP requests to FPM
#        SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
#        <FilesMatch "\.php$">
#            SetHandler "proxy:fcgi://127.0.0.1:9000"
#            ErrorDocument 503 {urlPath}/error_unavailable.html
#        </FilesMatch>
#    </IfVersion>
</Directory>
exo
  • 141
  • 1
  • 7

1 Answers1

0

Into the /etc/apache2/vhosts.d/default_vhost.include i must placed line

Include /etc/apache2/vhosts.d/99_icingaweb2.include

The line is at the end of the file. After the last existing tag.

In the 99_icingaweb2.include is:

Alias /icingaweb2 /usr/share/icingaweb2/public

<Directory "/usr/share/icingaweb2/public">
    Options SymLinksIfOwnerMatch
    AllowOverride None

    DirectoryIndex index.php

    <IfModule mod_authz_core.c>
        # Apache 2.4
        <RequireAll>
            Require all granted
        </RequireAll>
    </IfModule>

    SetEnv ICINGAWEB_CONFIGDIR "/etc/icingaweb2"

    EnableSendfile Off

    <IfModule mod_rewrite.c>
        RewriteEngine on
        RewriteBase /icingaweb2/
        RewriteCond %{REQUEST_FILENAME} -s [OR]
        RewriteCond %{REQUEST_FILENAME} -l [OR]
        RewriteCond %{REQUEST_FILENAME} -d
        RewriteRule ^.*$ - [NC,L]
        RewriteRule ^.*$ index.php [NC,L]
    </IfModule>

    <IfModule !mod_rewrite.c>
        DirectoryIndex error_norewrite.html
        ErrorDocument 404 /icingaweb2/error_norewrite.html
    </IfModule>

# Remove comments if you want to use PHP FPM and your Apache version
# is greater than or equal to 2.4
#    <IfVersion >= 2.4>
#        # Forward PHP requests to FPM
#        SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
#        <FilesMatch "\.php$">
#            SetHandler "proxy:fcgi://127.0.0.1:9000"
#            ErrorDocument 503 {urlPath}/error_unavailable.html
#        </FilesMatch>
#    </IfVersion>
</Directory>
exo
  • 141
  • 1
  • 7