From: opensides Date: Wed, 5 May 2010 17:01:41 +0000 (+0000) Subject: - Adding lighttpd configuration to Debian package Closes #946 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=23384364fb4c6e3aa2f98c684e9975292dbe7573;p=gosa.git - Adding lighttpd configuration to Debian package Closes #946 git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@18152 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/debian/99gosa-lighttpd.conf b/gosa-core/debian/99gosa-lighttpd.conf new file mode 100644 index 000000000..858c65bc2 --- /dev/null +++ b/gosa-core/debian/99gosa-lighttpd.conf @@ -0,0 +1,29 @@ +# lighttpd configuration for GOsa + +# Set alias to http:///gosa/ +alias.url += ( + "/gosa/" => "/usr/share/gosa/html/" +) + +# Enable FastCGI and set it to handle .php URLs +# php-cgi is run with the GOsa-required options +server.modules += ( "mod_fastcgi" ) + +$HTTP["url"] =~ "^/gosa/" { + fastcgi.server = ( ".php" => + (( + "bin-path" => "/usr/bin/php-cgi -d expose_php=Off -d magic_quotes_gpc=On", + "socket" => "/tmp/php.socket", + "max-procs" => 2, + "idle-timeout" => 20, + "bin-environment" => ( + "PHP_FCGI_CHILDREN" => "4", + "PHP_FCGI_MAX_REQUESTS" => "10000" + ), + "bin-copy-environment" => ( + "PATH", "SHELL", "USER" + ), + "broken-scriptfilename" => "enable" + )) + ) +} diff --git a/gosa-core/debian/control b/gosa-core/debian/control index eaa430935..704bc92ca 100644 --- a/gosa-core/debian/control +++ b/gosa-core/debian/control @@ -13,7 +13,7 @@ DM-Upload-Allowed: yes Package: gosa Architecture: all -Depends: php5, php5-cli, apache2-mpm-prefork, exim4 | mail-transport-agent, php5-gd, php5-imap, php5-ldap, php5-mcrypt, php5-mysql, php5-imagick | imagemagick (>= 5.4.4.5-1) | graphicsmagick-im-compat, libcrypt-smbhash-perl, smarty, php5-recode, smarty-gettext, smarty-acl-render, gettext, libapache2-mod-php5, ${misc:Depends} +Depends: php5, php5-cli, apache2-mpm-prefork | lighttpd , exim4 | mail-transport-agent, php5-gd, php5-imap, php5-ldap, php5-mcrypt, php5-mysql, php5-imagick | imagemagick (>= 5.4.4.5-1) | graphicsmagick-im-compat, libcrypt-smbhash-perl, smarty, php5-recode, smarty-gettext, smarty-acl-render, gettext, ${misc:Depends}, libapache2-mod-php5 | php5-cgi Suggests: gosa-si-server, cyrus21-imapd (>= 2.1.11), postfix-ldap, slapd, gosa-schema, php5-suhosin, php-apc, php-fpdf Description: Web Based LDAP Administration Program Provided is access to posix, shadow, samba, proxy, fax, pureftp and diff --git a/gosa-core/debian/gosa.install b/gosa-core/debian/gosa.install index 1a3408eac..a1c2cedb2 100644 --- a/gosa-core/debian/gosa.install +++ b/gosa-core/debian/gosa.install @@ -7,6 +7,7 @@ locale /usr/share/gosa plugins /usr/share/gosa setup /usr/share/gosa debian/gosa-apache.conf /etc/gosa +debian/99gosa-lighttpd.conf /etc/gosa contrib/shells /etc/gosa contrib/encodings /etc/gosa contrib/openldap/slapd.conf /usr/share/doc/gosa/slapd.conf-example diff --git a/gosa-core/debian/gosa.postinst b/gosa-core/debian/gosa.postinst index ae1081d93..cc4f8a98a 100644 --- a/gosa-core/debian/gosa.postinst +++ b/gosa-core/debian/gosa.postinst @@ -3,7 +3,7 @@ # # see: dh_installdeb(1) -set -e +set -ex case "$1" in configure) @@ -30,20 +30,60 @@ if [ ! -f /etc/gosa/gosa.secrets ]; then chmod 600 /etc/gosa/gosa.secrets fi -# Copy GOsa configuration to conf.d directories -if [ ! -L /etc/apache2/conf.d/gosa.conf ]; then +if [ -d /etc/apache2/conf.d ]; then - # Remove old instances of this file - if [ -f /etc/apache2/conf.d/gosa.conf ]; then - echo "Found old gosa apache configuration in /etc/apache2/conf.d - moving it to gosa.conf.orig..." - echo "Please check for changes in /etc/gosa/gosa-apache.conf if you modified this file!" - mv /etc/apache2/conf.d/gosa.conf /etc/apache2/conf.d/gosa.conf.orig + # Copy GOsa configuration to conf.d directories + if [ ! -L /etc/apache2/conf.d/gosa.conf ]; then + + # Remove old instances of this file + if [ -f /etc/apache2/conf.d/gosa.conf ]; then + echo "Found old gosa apache configuration in /etc/apache2/conf.d - moving it to gosa.conf.orig..." + echo "Please check for changes in /etc/gosa/gosa-apache.conf if you modified this file!" + mv /etc/apache2/conf.d/gosa.conf /etc/apache2/conf.d/gosa.conf.orig + fi + + echo "Making /gosa available in /etc/apache2/conf.d" + + # Add GOsa include file + ln -s /etc/gosa/gosa-apache.conf /etc/apache2/conf.d/gosa.conf + fi + + # Add support for RequestHeader + a2enmod headers + + # Finally restart servers + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d apache2 reload + else + /etc/init.d/apache2 reload fi +fi + +if [ -d /etc/lighttpd/conf-available ]; then + + # Copy GOsa configuration to conf-available directories /etc/lighttpd/conf-available + if [ ! -L /etc/lighttpd/conf-enabled/99gosa-lighttpd.conf ]; then + + # Remove old instances of this file + if [ -f /etc/lighttpd/conf-enabled/99gosa-lighttpd.conf ]; then + echo "Found old gosa apache configuration in /etc/lighttpd/conf-enabled - moving it to orig.gosa-lighttpd.conf ..." + echo "Please check for changes in /etc/lighttpd/conf-available/orig.99gosa-lighttpd.conf if you modified this file!" + mv /etc/lighttpd/conf-enabled/99gosa-lighttpd.conf /etc/lighttpd/conf-available/orig.gosa-lighttpd.conf + fi - echo "Making /gosa available in /etc/apache2/conf.d" + echo "Making /gosa available in /etc/lighttpd/conf-enabled/" + + # Add GOsa include file + ln -s /etc/gosa/99gosa-lighttpd.conf /etc/lighttpd/conf-enabled/99gosa-lighttpd.conf + fi + + # Finally restart servers + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d lighttpd reload + else + /etc/init.d/lighttpd reload + fi - # Add GOsa include file - ln -s /etc/gosa/gosa-apache.conf /etc/apache2/conf.d/gosa.conf fi # Add links for safe mode @@ -61,17 +101,7 @@ chmod 770 -R /var/spool/gosa chown root.$WEBGROUP -R /var/cache/gosa chmod 770 -R /var/cache/gosa -# Add support for RequestHeader -a2enmod headers - update-gosa -# Finally restart servers -if [ -x /usr/sbin/invoke-rc.d ]; then - invoke-rc.d apache2 reload -else - /etc/init.d/apache2 reload -fi - exit 0 diff --git a/gosa-core/debian/gosa.postrm b/gosa-core/debian/gosa.postrm index 12252fa91..8e5b4a1e0 100644 --- a/gosa-core/debian/gosa.postrm +++ b/gosa-core/debian/gosa.postrm @@ -2,7 +2,7 @@ # postrm script for GOsa # -set -e +set -ex case "$1" in purge|remove) @@ -15,17 +15,30 @@ case "$1" in fi fi - # Remove GOsa include - [ -L /etc/apache2/conf.d/gosa.conf ] && rm -f /etc/apache2/conf.d/gosa.conf + if [ -d /etc/apache2/conf.d ]; then + # Remove GOsa include + [ -L /etc/apache2/conf.d/gosa.conf ] && rm -f /etc/apache2/conf.d/gosa.conf - - # Restart servers - if [ -x /usr/sbin/invoke-rc.d ]; then + # Restart servers + if [ -x /usr/sbin/invoke-rc.d ]; then invoke-rc.d apache2 restart - else + else /etc/init.d/apache2 restart + fi fi + if [ -d /etc/lighttpd/conf-available ]; then + # Remove GOsa include + [ -L /etc/lighttpd/conf-enabled/99gosa-lighttpd.conf ] && rm -f /etc/lighttpd/conf-enabled/99gosa-lighttpd.conf + + # Restart servers + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d lighttpd restart + else + /etc/init.d/lighttpd restart + fi + fi + ;; upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)