[Kolab-devel] [issue3942] Split httpd.conf.template in an kolab specific part and a main part

Richard Bos issues at kolab.org
Sun Nov 8 21:32:18 CET 2009


New submission from Richard Bos <ml at radoeka.nl>:

I would like to make the following proposal for the apache configuration file:
split the apache configuration file httpd.conf.template in an application
independent file (the web engine settings) and a kolab specific configuration
file.

More verbose description:
At this moment all apache settings are stored in 1 big monolithic file called
httpd.conf.template.in.  This works and it works well for the openpkg based
version of kolab.  But for others (at least openSUSE), the problem is to keep in
sync with the changes made to this file.  To cope with this type of problem (not
kolab specific) openSUSE provides a main configuration file, that defines the
web engine, to enable packagers to store application specific apache
configuration files in a configuration directory called /etc/apache/conf.d.  All
the files in that directory are sourced in by the main apache configuration
file.  

At this moment I patch the main apache configuration file provided by kolab and
remove all the web engine settings.  This results in a kolab only apache
configuration file.  This works, but as stated before it is hard to keep in sync
with kolab.  The attached patch splits the httpd.conf.template.in file and
stores the kolab specific settings in httpd.kolab.template.in.

For openpkg the file is stored in the apache configuration directory and named
kolab.include.  All files with the prefix .include are sourced in the by main
apache configuration file provided by kolab (last line in the file).

Basically nothing changes, but the location of some variables move to separate
file.  Making it much easier for non openpkg packagers to keep in sync.

It would be nice if this patch can be viewed with in an short time span, as the
patch is now still fresh.  If it takes a long time, it will be more difficult to
process the feedback!

The patch may require a update to spec or debian control files.

The patch can be reviewed by comparing the lines that are removed by the patch
(apache.patch).  All the lines that are removed by the patch should be part of
the file templates/httpd.kolab.template.in

Looking forward to your feedback.

----------
files: httpd.kolab.template.in
messages: 22231
nosy: bernhard, martin, mathieu.parent, rbos, thomas, tspuhler, wilde, wrobel
priority: wish
status: unread
title: Split httpd.conf.template in an kolab specific part and a main part

______________________________________
Kolab issue tracker <issues at kolab.org>
<https://issues.kolab.org/issue3942>
______________________________________
-------------- next part --------------
KOLAB_META_START
TARGET=@webserver_confdir@/kolab.include
PERMISSIONS=0640
OWNERSHIP=@webserver_usr@:@webserver_grp@
RUNONCHANGE=@KOLABRC@ rc apache reload
KOLAB_META_END
# This program is Free Software under the GNU General Public License (>=v2).
# Read the file COPYING that comes with this packages for details.

# this file is automatically written by the Kolab config backend
# manual additions are lost unless made to the template in the Kolab config directory

# FreeBusy list handling
RewriteEngine On
#RewriteLog "/tmp/rewrite.log"
#RewriteLogLevel 9
# Without DOCUMENT_ROOT the rewrite engine uses a real /freebusy directory
# on the filesystem before %{DOCUMENT_ROOT}/freebusy.  This may result in
# unexpected behaviour.
RewriteRule ^/freebusy/([^/]+)\.ifb %{DOCUMENT_ROOT}/freebusy/freebusy.php?uid=$1
RewriteRule ^/freebusy/([^/]+)\.vfb %{DOCUMENT_ROOT}/freebusy/freebusy.php?uid=$1
RewriteRule ^/freebusy/([^/]+)\.xfb %{DOCUMENT_ROOT}/freebusy/freebusy.php?uid=$1&extended=1
RewriteRule ^/freebusy/trigger/(.+)\.pfb %{DOCUMENT_ROOT}/freebusy/pfb.php?folder=$1&cache=0
RewriteRule ^/freebusy/(.+)\.pfb %{DOCUMENT_ROOT}/freebusy/pfb.php?folder=$1&cache=1
RewriteRule ^/freebusy/(.+)\.pxfb %{DOCUMENT_ROOT}/freebusy/pfb.php?folder=$1&cache=1&extended=1

<Location "@webserver_web_prefix@/">
    ErrorDocument 403 https://@@@fqdnhostname@@@@kolab_wui@/
</Location>
<Location "@kolab_wui@">
    SSLRequireSSL
</Location>
<Location "@webserver_web_prefix@/client">
    ErrorDocument 403 https://@@@fqdnhostname@@@@webserver_web_prefix@/client/
    SSLRequireSSL
</Location>
<Location "@webserver_web_prefix@/fbview">
    ErrorDocument 403 https://@@@fqdnhostname@@@@webserver_web_prefix@/fbview/
    SSLRequireSSL
</Location>
@@@if apache-http@@@
@@@else@@@
<Location "@webserver_web_prefix@/freebusy">
    SSLRequireSSL
</Location>
@@@endif@@@

# Redirect from the old Kolab web client location (Kolab-Server-2.2.0)
# to the new one (Kolab-Server >= 2.2.1)                              
Redirect /horde https://kolab2.radoeka.nl/client                      

<AuthnProviderAlias ldap ldap-mail>
  AuthLDAPURL ldap://@@@ldap_ip@@@:@@@ldap_port@@@/@@@base_dn@@@?mail
  AuthLDAPBindDN "@@@php_dn@@@"
  AuthLDAPBindPassword "@@@php_pw@@@"
  AuthzLDAPAuthoritative off
</AuthnProviderAlias>
<AuthnProviderAlias ldap ldap-uid>
  AuthLDAPURL ldap://@@@ldap_ip@@@:@@@ldap_port@@@/@@@base_dn@@@?uid
  AuthLDAPBindDN "@@@php_dn@@@"
  AuthLDAPBindPassword "@@@php_pw@@@"
  AuthzLDAPAuthoritative off
</AuthnProviderAlias>

<Directory "@webserver_document_root@/freebusy">
   AllowOverride None
   Options None
   # Disallow for everyone as default
   Order allow,deny
   Allow from all
@@@if apache-allow-unauthenticated-fb@@@
@@@else@@@
   Require valid-user
   AuthType Basic
   AuthName "Kolab Freebusy"

   AuthBasicAuthoritative off
   AuthUserFile /dev/null
   AuthBasicProvider ldap-mail ldap-uid
@@@endif@@@
   AddDefaultCharset Off  
</Directory>

<Directory "@webserver_document_root@/client">
    AllowOverride All
    Allow from all
</Directory>

<Directory "@webserver_document_root@/fbview">
    AllowOverride All
    Allow from all
</Directory>

<Directory "@webserver_document_root@@kolab_wui@">
   AllowOverride None
   Options None
   Order allow,deny
   Allow from all
</Directory>



More information about the devel mailing list