Installation of Apache2 xsendfile module

I tried to install xsendfile module for apache2 as explained here: Unfortunately, on debian, installation failed because httpd.conf is not packaged as expected. Fortunately, a samaritan made a .deb package ready for install! (see: Here are the steps:

  1. edit /etc/apt/sources.list and add the following two lines:
    deb hardy main
    deb-src 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!


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

Post a Comment

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