forcing oft mime type file to download

Apache is sometimes nice and sometimes ugly. Show me the ugly Apache 🙂

I have a webserver with Apache and some files doc, pdf and “oft” outlook template file.
Internet Explorer open “oft” directly without prompting and show the source code of the file.

add to your apache2.conf file following

AddType application/octet-stream .oft oft

Check your apache conf file that is allowed to use htaccess file

Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all

we need two mods, rewrite and headers, very often rewrite is enable, headers not so often. When you not have enable headers you will get a 500 server error from Apache.

enable headers with

a2enmod headers

apachectl restart


place your .htaccess file in your www data folder /var/www/

You need following content, this works with all other extension that you will be force to download

<FilesMatch “\.(.oft|OFT)$”>
ForceType application/octet-stream
Header set Content-Disposition attachment


That´s it




Redmine repository 404 not found

We look in to redmine production.log file an see follow error


git: error during get default branch: Couldn’t find all GitCaches with ‘id’: (last, {:order=>”created_at DESC”}) (found 0 results, but was looking for 2)
Completed 404 Not Found in 361ms (ActiveRecord: 66.9ms)

What can i do to fix this issue?

Gitolite upgrades can change /home/git/.gitolite.rc this file.

Than can happend, that you have a UMASK 0077 thats wrong, you need 0022


Thats all


Another Solution is

setfacl -R -m u:git:rX /home/git/repositories/


Hint found here

How to build Zookeeper DEB for Ubuntu14.04

You need the zookeeper 3.4.6 package for Ubuntu 14.04 LTS


 gzip -dc zookeeper-3.4.6.tar.gz | tar xf –


vi src/packages/deb/zookeeper.control/control

in file remove line

Depends: sun-java6-jre

You need a few packages to compile it

apt-get install python-setuptools libcppunit-dev build-essential libboost-all-dev cmake flex libtool ant

and then start build process

/zookeeper-3.4.6# ant deb

this takes a few minutes, the deb packe can be found under /build

And a complete build run

Click to access build.pdf

Some found here

Apache Logs meisten Zugriffe

Gute Frage, eine Zeile Code und schon kann es los gehen.

/var/log/apache(httpd) je nach System

tail -10000 access_log | awk ‘{print $1}’ | sort | uniq -c | sort -n | tail

gefunden bei

schauen wie viele Verbindungen der Apache aufgebaut hat immer was passendes Dabei