Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to get mod xsendfile installed on my debian lenny server but I can not seem to find a deb anywhere not even on backports

When installing from source : it seems the installer gets a bit angry when trying to muck around with apache conf files.

I can kind of get this all to hand together, but was wondering are any clean steps to get xsendfile installed on apache?

(Side question: is there a reason its not in the mainstream repos - is there something inherently unstable about it?)

share|improve this question
up vote 2 down vote accepted

The package is in squeeze/sid, just install libapache2-mod-xsendfile after adding either repo to your /etc/apt/sources.list.

I dont know why it wasnt included before. Its not in stable atleast, that much i know.


I dont have the rank to edit other users posts but here goes Sam.

If you want to use dpkg -i to install the package you will have to download the individual package, choose architecture and download.


dpkg -i libapache2-mod-xsendfile_0.9-2_i386.deb

I suggest adding squeeze or sid to /etc/apt/sources.list and then use apt (will download, install and satisfy any dependencies for the package):

apt-get install libapache2-mod-xsendfile

If you want to use apt-pinning use something like this in your /etc/apt/preferences

Package: *
Pin: release a=stable
Pin-Priority: 700

Package: *
Pin: release a=testing
Pin-Priority: 650

Package: *
Pin: release a=unstable
Pin-Priority: 600

This will cause stable to be of higher priority than testing(squeeze) and unstable(sid) and thus use stable as default when downloading packages with the apt tools.

share|improve this answer
you will still need to add this to your http.conf file (apache configuration) To do this, if you are in ubuntu, cd /etc/apache2/ and sudo nano apache2.conf then: sudo service apache2 restart XSendFile On add the following at the end: XSendFile On – Paul Preibisch Jun 10 '15 at 22:22

You should follow artifexs advice but you should be careful when adding the unstable/sid repository to your apt configuration! Packages from unstalbe7sid will override the ones from stable/lenny when doing an apt-get upgrade. You should use apt pinning to downgrade the priority of unstable/sid. Otherwise you will run into troubles during your next upgrade.

share|improve this answer
since this is now the top google answer, perhaps some instructions with dpkg -i would be better ... – Sam Saffron Feb 17 '10 at 22:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.