Installation of Apache2 xsendfile module

I tried to install xsendfile module for apache2 as explained here: http://tn123.ath.cx/mod_xsendfile/ Unfortunately, on debian, installation failed because httpd.conf is not packaged as expected. Fortunately, a samaritan made a .deb package ready for install! (see: http://www.screenage.de/blog/2008/02/22/libapache2-mod-xsendfile-processes-x-sendfile-headers-with-apache2/) Here are the steps:

  1. edit /etc/apt/sources.list and add the following two lines:
    deb http://ppa.launchpad.net/damokles/ubuntu hardy main
    deb-src http://ppa.launchpad.net/damokles/ubuntu hardy main
  2. save your changes and run “sudo apt-get update”
  3. if you’re successful, running “apt-cache search xsendfile” should return the following package:

    libapache2-mod-xsendfile – Module to processes X-SENDFILE headers registered by the original output handler

  4. Install this package: “sudo apt-get install libapache2-mod-xsendfile”
  5. link newly created apache module to your active modules directory: sudo ln -s /etc/apache2/mods-available/xsendfile.load /etc/apache2/mods-enabled
  6. in your .htaccess file, enable the module by appending the following line: XSendFile On
    note: you may also want to enable XSendFileAllowAbove on option (see xsendfile not working with apache2 for more details)
  7. restart apache: “sudo /etc/init.d/apache2”

That’s it!
You can start using xsendfile module!

sources

4 Comments: Trackback URL | Comments RSS

  1. yeago Says:

    you rule.
  2. Bram Says:

    Step 5 can be replaced with more elegant: sudo a2enmod xsendfile Also, this seems to work fine on Jaunty, (even with the hardy repository)
  3. Brandon Mason Says:

    This was soooo helpful. We never would have figured out these steps without a guide. Thanks for posting!
  4. Jarrod Neven Says:

    Red Hat or Centos RPM available here http://fr2.rpmfind.net/linux/rpm2html/search.php?query=mod_xsendfile.so()(64bit)

Post a Comment

Your email is never published nor shared. You're allow to say what you want...