Solved

Centreon HTTPS issue

  • 25 February 2022
  • 3 replies
  • 362 views

Badge +1

Hello,

 

I have followed the guide from the Wiki to enable HTTPS
https://docs.centreon.com/docs/administration/secure-platform

Yet when I try and access Centreon I get an Internal Server Error and in the httpd logs

[Fri Feb 25 10:07:53.701198 2022] [core:error] [pid 11079] [client xxxxxxxxxx:60528] AH00125: Request exceeded the limit of 10 subrequest nesting levels due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.


This is the configuration (ssl cert domain hidden) /opt/rh/httpd24/root/etc/httpd/conf.d/10-centreon.conf

Alias /centreon/api /usr/share/centreon
Alias /centreon /usr/share/centreon/www/

<LocationMatch ^/centreon/(?!api/latest/|api/beta/|api/v[0-9]+/|api/v[0-9]+\.[0-9]+/)(.*\.php(/.*)?)$>
ProxyPassMatch fcgi://127.0.0.1:9042/usr/share/centreon/www/$1
</LocationMatch>

<LocationMatch ^/centreon/(authentication|api/(latest|beta|v[0-9]+|v[0-9]+\.[0-9]+))/.*$>
ProxyPassMatch fcgi://127.0.0.1:9042/usr/share/centreon/api/index.php/$1
</LocationMatch>

ProxyTimeout 300

Header set X-Frame-Options: "sameorigin"
Header always edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure;SameSite=Strict
ServerSignature Off
ServerTokens Prod
TraceEnable Off

<VirtualHost *:80>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</VirtualHost>

<VirtualHost *:443>
#####################
# SSL configuration #
#####################
SSLEngine On
SSLProtocol All -SSLv3 -SSLv2 -TLSv1 -TLSv1.1
SSLCipherSuite ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-DSS-AES256-GCM-SHA384:DHE-DSS-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-GCM-SHA256:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ADH:!IDEA
SSLHonorCipherOrder On
SSLCompression Off
SSLCertificateFile /etc/letsencrypt/live/foobar.domain.io/fullchain.cer
SSLCertificateKeyFile /etc/letsencrypt/live/foobar.domain.io/foobar.domain.io.key

<IfModule mod_security2.c>
# https://github.com/SpiderLabs/ModSecurity/issues/652
SecRuleRemoveById 200003
</IfModule>

<Directory "/usr/share/centreon/www">
DirectoryIndex index.php
Options Indexes
AllowOverride all
Order allow,deny
Allow from all
Require all granted
<IfModule mod_php5.c>
php_admin_value engine Off
</IfModule>

FallbackResource /centreon/index

AddType text/plain hbs
</Directory>

<Directory "/usr/share/centreon/api">
Options Indexes
AllowOverride all
Order allow,deny
Allow from all
Require all granted
<IfModule mod_php5.c>
php_admin_value engine Off
</IfModule>

AddType text/plain hbs
</Directory>
</VirtualHost>

RedirectMatch ^/$ /centreon


My guess is that the issue is with FallbackResource /centreon/index but coming from Nginx and being new to Centreon I am a bit lost.

CentOS Linux release 7.9.2009

Thanks.

icon

Best answer by Kriko 25 February 2022, 16:04

View original

3 replies

Userlevel 5
Badge +16

Hello @guest6936 

 

Sorry about this.

You can correct this by adding .html to 

FallbackResource /centreon/index

like this:

        FallbackResource /centreon/index.html

There is a PR to fix asap this issue: https://github.com/centreon/centreon-documentation/pull/1320

 

Tell me if it fixe your issue.

Kriko.

Badge +1

Hello @guest6936 

 

Sorry about this.

You can correct this by adding .html to 

FallbackResource /centreon/index

like this:

        FallbackResource /centreon/index.html

There is a PR to fix asap this issue: https://github.com/centreon/centreon-documentation/pull/1320

 

Tell me if it fixe your issue.

Kriko.

 

 

Thanks, the issue has been resolved by changing the FallbackResource.

Badge +2

I have made this change, restarted the centreon processes and it still doesn't work.

 

Reply