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 need to serve a bunch of gzipped MIDI files from an Apache server. The catch is that when the user requests them, the response should come back with a "audio/midi" content-type header and not a gzip file or multipart header. In other words, Im trying to render the content(play the MIDI) off of the server and not download it to their drive. Is there an easy way I can do this ?

share|improve this question

migrated from Mar 12 '11 at 23:50

This question came from our site for professional and enthusiast programmers.

Any reason you can't just unzip them on the server? MIDI files are miniscule! – SpliFF Mar 11 '11 at 4:05
So here's the unusual scenario...I have 80-90K MIDI files, all containing repetitive content. And then there need to be 150 versions, each with a different BPM. Which makes this cost about 12-13MB per user uploaded file. It starts to add up really quick. – udit Mar 11 '11 at 4:23

To ensure that Apache looks for when the browser

Need to add

Options MultiViews

in the apache config.

To ensure the content-type is appropriate, we need to add the following

<Files *.mid.gz>
  SetOutputFilter DEFLATE
  ForceType audio/midi
share|improve this answer

Your Answer


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