Koozali.org: home of the SME Server
Obsolete Releases => SME 6.x Contribs => Topic started by: holck on September 17, 2006, 12:17:50 AM
-
I know it is recommended to upgrade to SME 7 instead of installing Horde 3.0 on SME 6.01, but nevertheless... the solution below can maybe be used for SME 7 also?
In order to view Word etc. documents directly inside Horde, I installed wvhtml from here (http://ftp.pbone.net/mirror/apt.unl.edu/apt/fedora/redhat/7/RPMS.stable/wv-1.0.0-0.fdr.0.rh73.i386.rpm), which worked nicely except that images from the word-documents didn't show. The reason, I found out, is that wvhtml writes embedded images in the /tmp directory, whereas the web server tries to find them in the /home/httpd/html/horde/imp/ directory.
I have made a few patches to make the images show, as explained below.
Copy the file 85HordeAccess from
/etc/e-smith/templates/etc/httpd/conf/httpd.conf/
to
/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/
Add the following lines to the new copy of 85HordeAccess, after the line
# Horde specific configuration files
:
<Directory /tmp>
<FilesMatch "msword.*">
Order Allow,Deny
Allow from all
</FilesMatch>
</Directory>
Create the directory
/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts
Copy the file 30WebMailAliases from
/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/
to
/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts/
after this line
$OUT .= " Alias /webmail $impdir\n";
In the new copy of 30WebMailAliases, add the following two lines
$OUT .= " RewriteEngine on\n";
$OUT .= " RewriteRule ^/horde/imp/msword(.+) /tmp/msword\$1 [L]\n";
Expand the new template:
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
Restart httpd:
/etc/e-smith/events/actions/restart-httpd-full
Empty the php-eaccelerator cache:
rm -f /var/cache/php-eaccelerator/*
That is it, I hope it works. The solution opens a small security hole: if outsiders can guess the names of msword* files in the /tmp directory, they can read these files.