Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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:

<html></html>

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
share|improve this question

migrated from stackoverflow.com Oct 8 '12 at 11:44

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

    
Did you restart the Apache service after that modification? –  GolezTrol Oct 8 '12 at 9:48
    
Have you tried using a different browser? (trying to eliminate that the problem is on the client side). –  Colin 't Hart Oct 8 '12 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.

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

Maybe

AddType audio/mpeg .mp3

And then restart apache.

share|improve this answer

Your Answer

 
discard

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.