From 176588c87d9da28ea913b1a93293ac3b9ecfe66d Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Thu, 5 Jun 2014 14:54:00 +0000 Subject: [PATCH] installation: get rid of .htaccess, less automake Trying to remove a bunch of autoconf and .htaccess-related stuff. This commit is the last one from a series now finally allowing to run icingaweb directly from a git checkout. refs #4075 --- .../files/etc/httpd/conf.d/icingaweb.conf | 19 +++++++++++++++---- .../files/var/www/html/icingaweb/.htaccess | 11 ----------- .vagrant-puppet/manifests/default.pp | 6 ------ configure | 3 +-- configure.ac | 1 - etc/apache/icingaweb.conf.in | 19 ++++++++++++++----- icingaweb2.spec | 5 +---- public/.gitignore | 2 -- public/.htaccess.in | 7 ------- public/{index.php.in => index.php} | 1 - 10 files changed, 31 insertions(+), 43 deletions(-) delete mode 100644 .vagrant-puppet/files/var/www/html/icingaweb/.htaccess delete mode 100644 public/.gitignore delete mode 100644 public/.htaccess.in rename public/{index.php.in => index.php} (57%) diff --git a/.vagrant-puppet/files/etc/httpd/conf.d/icingaweb.conf b/.vagrant-puppet/files/etc/httpd/conf.d/icingaweb.conf index 16dd5e9cb..93b187b87 100644 --- a/.vagrant-puppet/files/etc/httpd/conf.d/icingaweb.conf +++ b/.vagrant-puppet/files/etc/httpd/conf.d/icingaweb.conf @@ -1,10 +1,21 @@ - Options -Indexes - - AllowOverride All - + Options SymLinksIfOwnerMatch + AllowOverride None Order allow,deny Allow from all + # SetEnv ICINGAWEB_CONFIGDIR /etc/icingaweb + EnableSendfile Off + + RewriteEngine on + RewriteBase /icingaweb/ + RewriteCond %{REQUEST_FILENAME} -s [OR] + RewriteCond %{REQUEST_FILENAME} -l [OR] + RewriteCond %{REQUEST_FILENAME} -d + RewriteRule ^.*$ - [NC,L] + RewriteRule ^.*$ index.php [NC,L] + + php_value xdebug.idekey PHPSTORM + diff --git a/.vagrant-puppet/files/var/www/html/icingaweb/.htaccess b/.vagrant-puppet/files/var/www/html/icingaweb/.htaccess deleted file mode 100644 index f5ea66435..000000000 --- a/.vagrant-puppet/files/var/www/html/icingaweb/.htaccess +++ /dev/null @@ -1,11 +0,0 @@ -RewriteEngine on -RewriteBase /icingaweb -RewriteCond %{REQUEST_FILENAME} -s [OR] -RewriteCond %{REQUEST_FILENAME} -l [OR] -RewriteCond %{REQUEST_FILENAME} -d -RewriteRule ^.*$ - [NC,L] -RewriteRule ^.*$ index.php [NC,L] - -php_flag short_open_tag on - -php_value xdebug.idekey PHPSTORM diff --git a/.vagrant-puppet/manifests/default.pp b/.vagrant-puppet/manifests/default.pp index fa85b48fd..040e5574b 100644 --- a/.vagrant-puppet/manifests/default.pp +++ b/.vagrant-puppet/manifests/default.pp @@ -767,12 +767,6 @@ file { '/var/www/html/icingaweb/css.php': ensure => absent, } -file { '/var/www/html/icingaweb/.htaccess': - source => 'puppet:////vagrant/.vagrant-puppet/files/var/www/html/icingaweb/.htaccess', - owner => 'apache', - group => 'apache', -} - file { '/etc/httpd/conf.d/icingaweb.conf': source => 'puppet:////vagrant/.vagrant-puppet/files/etc/httpd/conf.d/icingaweb.conf', require => Package['apache'], diff --git a/configure b/configure index 07073a2de..d1738226a 100755 --- a/configure +++ b/configure @@ -2950,7 +2950,7 @@ fi # # Create config files # -ac_config_files="$ac_config_files Makefile config/authentication.ini config/config.ini config/resources.ini config/modules/monitoring/backends.ini config/modules/monitoring/instances.ini etc/apache/icingaweb.conf public/.htaccess public/index.php" +ac_config_files="$ac_config_files Makefile config/authentication.ini config/config.ini config/resources.ini config/modules/monitoring/backends.ini config/modules/monitoring/instances.ini etc/apache/icingaweb.conf public/index.php" # @@ -3669,7 +3669,6 @@ do "config/modules/monitoring/backends.ini") CONFIG_FILES="$CONFIG_FILES config/modules/monitoring/backends.ini" ;; "config/modules/monitoring/instances.ini") CONFIG_FILES="$CONFIG_FILES config/modules/monitoring/instances.ini" ;; "etc/apache/icingaweb.conf") CONFIG_FILES="$CONFIG_FILES etc/apache/icingaweb.conf" ;; - "public/.htaccess") CONFIG_FILES="$CONFIG_FILES public/.htaccess" ;; "public/index.php") CONFIG_FILES="$CONFIG_FILES public/index.php" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; diff --git a/configure.ac b/configure.ac index 42a37f3dc..3ae33025d 100644 --- a/configure.ac +++ b/configure.ac @@ -440,7 +440,6 @@ AC_CONFIG_FILES([ config/modules/monitoring/backends.ini config/modules/monitoring/instances.ini etc/apache/icingaweb.conf - public/.htaccess public/index.php ]) diff --git a/etc/apache/icingaweb.conf.in b/etc/apache/icingaweb.conf.in index 7c87a2d11..69335368e 100644 --- a/etc/apache/icingaweb.conf.in +++ b/etc/apache/icingaweb.conf.in @@ -1,12 +1,21 @@ -Alias @web_path@ @prefix@/public +Alias @web_path@ "@prefix@/public" + - Options -Indexes - - AllowOverride All - + Options SymLinksIfOwnerMatch + AllowOverride None Order allow,deny Allow from all + SetEnv ICINGAWEB_CONFIGDIR @icingaweb_config_path@ + EnableSendfile Off + + RewriteEngine on + RewriteBase @web_path@/ + RewriteCond %{REQUEST_FILENAME} -s [OR] + RewriteCond %{REQUEST_FILENAME} -l [OR] + RewriteCond %{REQUEST_FILENAME} -d + RewriteRule ^.*$ - [NC,L] + RewriteRule ^.*$ index.php [NC,L] diff --git a/icingaweb2.spec b/icingaweb2.spec index 385be86e6..b1cb3d2e5 100644 --- a/icingaweb2.spec +++ b/icingaweb2.spec @@ -164,9 +164,8 @@ install -D -m0644 packages/rhel/etc/httpd/conf.d/icingaweb.conf %{buildroot}/%{a %{__cp} -r application library modules public %{buildroot}/%{sharedir}/ -# install index.php, .htaccess +# install index.php install -m0644 packages/rhel/usr/share/icingaweb/public/index.php %{buildroot}/%{sharedir}/public/index.php -install -m0644 packages/rhel/usr/share/icingaweb/public/.htaccess %{buildroot}/%{sharedir}/public/.htaccess # use the vagrant config for configuration for now - TODO %{__cp} -r .vagrant-puppet/files/etc/icingaweb %{buildroot}/%{_sysconfdir}/ @@ -183,8 +182,6 @@ install -D -m0755 bin/icingacli %{buildroot}/usr/bin/icingacli # install sql schema files as example # delete all *.in files -rm -f %{buildroot}/%{_datadir}/%{name}/public/index.php.in -rm -f %{buildroot}/%{_datadir}/%{name}/public/.htaccess.in %pre # Add apacheuser in the icingacmd group diff --git a/public/.gitignore b/public/.gitignore deleted file mode 100644 index 4c3d24e81..000000000 --- a/public/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.htaccess -index.php diff --git a/public/.htaccess.in b/public/.htaccess.in deleted file mode 100644 index a575ad6d3..000000000 --- a/public/.htaccess.in +++ /dev/null @@ -1,7 +0,0 @@ -RewriteEngine on -RewriteBase @web_path@ -RewriteCond %{REQUEST_FILENAME} -s [OR] -RewriteCond %{REQUEST_FILENAME} -l [OR] -RewriteCond %{REQUEST_FILENAME} -d -RewriteRule ^.*$ - [NC,L] -RewriteRule ^.*$ index.php [NC,L] diff --git a/public/index.php.in b/public/index.php similarity index 57% rename from public/index.php.in rename to public/index.php index a8a4f26a3..69b3dfce8 100644 --- a/public/index.php.in +++ b/public/index.php @@ -1,4 +1,3 @@