Gentooにicinga2インストールドキュメントがありません。

Gentooにicinga2インストールドキュメントがありません。

Gentooにmariadb、apache2、php、icinga2、icingaweb2をインストールする必要があります。

ドキュメントによると、mariadb、apache2、(おそらく)phpとicinga2が正常にインストールされました。

(ログによると)現在、icinga2はエラーなしで実行されています。ただし、icingaweb2を正しく設定できません。

Gentooでicingaweb2を設定する方法に関するドキュメント/チュートリアルはありますか?

この時点では、ポート80にはデフォルトのHTTP設定のみが必要ですが、LDAPは必要ありません。 (後でSSLセキュリティとドメインを使用します...)

この記事では、私が間違えた部分は明確ではありません。

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

現在のみhttp://localhost応答(基本的なApacheメッセージ「It Works!」)

存在するhttp://localhost/icingaweb2http://icingaweb2/icingaclihttp://icingaweb2/setup待って…何もない

icingaweb2ドキュメントのルートが/var/www/または/usr/share/icingaweb2/public/のどちらにあるべきかわかりません。

私の/etc/apache2/vhosts.d/00_default_vhost.confには次のものがあります。

##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>

ベストアンサー1

/etc/apache2/vhosts.d/default_vhost.includeに移動して、次の行を入力する必要がありました。

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

この行はファイルの末尾にあります。最後の既存のタグの後ろ。

99_icingaweb2.includeは次のようになります。

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>

おすすめ記事