Apache doesn't send me an MP3 header even when using a direct address to the file. It means I can play it with Flash audio players on my web pages, but when I tried to download from the direct address on my server I got:

Error 101 (net::ERR_CONNECTION_RESET): The connection was reset

Or it sometimes gives me a file with a .mp3 file extension that just has a file size of 13 bytes. When I open that file in gedit/Notepad there is just:


I don't have any problem with PHP files and images, but the MP3 files are never send to the browser for download or play.

I added the following code to httpd.conf, but there is not any difference!

AddType audio/mpeg   .mp3
  • Did you restart the Apache service after that modification?
    – GolezTrol
    Oct 8, 2012 at 9:48
  • Have you tried using a different browser? (trying to eliminate that the problem is on the client side). Oct 8, 2012 at 11:54

2 Answers 2


You need to modify your mime.types file not your httpd.conf file. Add (or modify) the following line to your mime.types file and restart Apache.

audio/mpeg          mpga mp2 mp3

See this post about for an example mime.types file that should cover all of your application's needs.

  • audio/mpeg mpga mp2 mp2a mp3 m2a m3a should already be in any recent builds of Apache.
    – Chris S
    Oct 8, 2012 at 15:21
  • Should be, but who knows what version/build the OP is on.
    – Craine
    Oct 8, 2012 at 15:26


AddType audio/mpeg .mp3

And then restart apache.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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