1 |
--- smeserver-zarafa-0.9.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86ZarafaAlias.http 2008-12-21 18:19:28.000000000 +1100 |
2 |
+++ smeserver-zarafa-0.9.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86ZarafaAlias 2008-12-21 18:29:51.000000000 +1100 |
3 |
@@ -1,12 +1,37 @@ |
4 |
+{ |
5 |
+ my $zstatus = $zarafa{'status'}; |
6 |
|
7 |
- Alias /zarafa /var/www/html/webaccess/ |
8 |
- <Directory /var/www/html/webaccess/> |
9 |
- Options -Indexes |
10 |
- AllowOverride None |
11 |
- order allow,deny |
12 |
- allow from all |
13 |
- AddType application/x-httpd-php .php |
14 |
- php_flag magic_quotes_gpc off |
15 |
- php_flag track_vars on |
16 |
- </Directory> |
17 |
+ if (defined $zstatus && $zstatus eq 'enabled') |
18 |
+ { |
19 |
+ $OUT .= qq( |
20 |
+# Zarafa specific configuration files. |
21 |
+ |
22 |
+<Directory /var/www/html/> |
23 |
+ Options -Indexes |
24 |
+ AllowOverride None |
25 |
+ order allow,deny |
26 |
+ allow from all |
27 |
+ AddType application/x-httpd-php .php .php3 |
28 |
+ php_flag magic_quotes_gpc off |
29 |
+</Directory> |
30 |
+ |
31 |
+<Directory /var/www/html/z-push/> |
32 |
+ Options -Indexes |
33 |
+ AllowOverride None |
34 |
+ order allow,deny |
35 |
+ allow from all |
36 |
+ AddType application/x-httpd-php .php |
37 |
+ php_flag magic_quotes_gpc off |
38 |
+ php_flag register_globals off |
39 |
+ php_flag magic_quotes_runtime off |
40 |
+ php_flag short_open_tag on |
41 |
+</Directory> |
42 |
+ |
43 |
+); |
44 |
+ } |
45 |
+ else |
46 |
+ { |
47 |
+ $OUT .= "# Zarafa Webmail is not configured as it is disabled in the config db"; |
48 |
+ } |
49 |
+} |
50 |
|
51 |
--- smeserver-zarafa-0.9.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/29ZarafaAliases.http 2008-12-21 18:18:18.000000000 +1100 |
52 |
+++ smeserver-zarafa-0.9.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/29ZarafaAliases 2008-12-21 18:27:27.000000000 +1100 |
53 |
@@ -0,0 +1,27 @@ |
54 |
+{ |
55 |
+ # vim: ft=perl: |
56 |
+ |
57 |
+ $haveSSL = (exists ${modSSL}{status} and ${modSSL}{status} eq "enabled") ? 'yes' : 'no'; |
58 |
+ my $zwebmailStatus = $zarafa{'status'} || "disabled"; |
59 |
+ my $zwebmailAccessType = $zarafa{'access'} || "SSL"; |
60 |
+ |
61 |
+ my $dirs; |
62 |
+ $dirs{zarafa} = '/var/www/html/webaccess'; |
63 |
+ $dirs{webaccess} = '/var/www/html/webaccess'; |
64 |
+ $dirs{webmail} = '/var/www/html/webaccess'; |
65 |
+ $dirs{mobile} = '/var/www/html/webaccess-mobile'; |
66 |
+ $dirs{'Microsoft-Server-ActiveSync'} = '/var/www/html/z-push/index.php'; |
67 |
+ |
68 |
+ return " # Zarafa is disabled in this VirtualHost\n" |
69 |
+ unless $zwebmailStatus eq 'enabled'; |
70 |
+ |
71 |
+ foreach $place ('zarafa','webaccess','webmail','mobile','Microsoft-Server-ActiveSync') |
72 |
+ { |
73 |
+ if (($port eq "80") && ($haveSSL eq 'yes') && ($zwebmailAccessType eq 'SSL')) |
74 |
+ { |
75 |
+ $OUT .= " RewriteRule ^/$place(/.*|\$) https://%{HTTP_HOST}/$place\$1 [L,R]\n"; |
76 |
+ } else { |
77 |
+ $OUT .= " Alias /$place $dirs{$place}\n"; |
78 |
+ } |
79 |
+ } |
80 |
+} |