Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
install(sources) modify the libinstall/functions file for APIv2 (#8188)
Browse files Browse the repository at this point in the history
  • Loading branch information
kermith72 authored and loiclau committed Dec 30, 2019
1 parent 904f922 commit ec10b03
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion libinstall/functions
Original file line number Diff line number Diff line change
Expand Up @@ -1279,11 +1279,16 @@ prepare_apache_config() {

# Prepare apache config
${CAT} << __EOT__ > $directory/centreon.apache.conf
Alias /centreon/api $INSTALL_DIR_CENTREON
Alias /centreon $INSTALL_DIR_CENTREON/www/
<LocationMatch ^/centreon/(.*\.php(/.*)?)$>
<LocationMatch ^/centreon/(?!api/latest/|api/beta/|api/v[0-9]+/|api/v[0-9]+\.[0-9]+/)(.*\.php(/.*)?)$>
ProxyPassMatch fcgi://127.0.0.1:9042${INSTALL_DIR_CENTREON}/www/\$1
</LocationMatch>
<LocationMatch ^/centreon/api/(latest/|beta/|v[0-9]+/|v[0-9]+\.[0-9]+/)(.*)$>
ProxyPassMatch fcgi://127.0.0.1:9042${INSTALL_DIR_CENTREON}/api/index.php/\$1
</LocationMatch>
ProxyTimeout 300
<Directory "$INSTALL_DIR_CENTREON/www">
Expand All @@ -1300,6 +1305,19 @@ ProxyTimeout 300
AddType text/plain hbs
</Directory>
<Directory "$INSTALL_DIR_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>
RedirectMatch ^/$ /centreon
__EOT__
Expand Down

0 comments on commit ec10b03

Please sign in to comment.