Click to See Complete Forum and Search --> : [RESOLVED] New Apache upgrade breaks MP3s


nemonoman
05-10-2008, 09:26 AM
I'm not getting any help on Apache forums, so I thought I'd go slightly off topic here: I've appreciated the good help of my fellow phpBuilders on many occasions. So:

HELP!!

Somethings up, and I think it's some filter in apache. This started on a new server using Apache 2.2.

Leave off the .mp3 and file plays OK
http://dontworry.org/david/welcome

INCLUDE the .mp3 and file ONLY plays first 12 seconds or so:

http://dontworry.org/david/welcome.mp3

Works this way with all .mp3s

On my old servers (Apache 1.3 or 2.0) no problem. I have not messed around with .conf files, so I think something has been changed.

I have looked at everything I can think of. DEFLATE seems like a likely candidate.
Maybe it's a timeout?

But I don't know precisely what to look for, where to look, or what to change when I get there. Yikes.

Thanks for help
Nemo

nemonoman
05-10-2008, 09:48 PM
The problem was that I needed to tell apache NOT to 'deflate' mp3s.
Based on apache documentation I added this to the httpd.conf file:

<Location />

# Insert filter
SetOutputFilter DEFLATE

# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html

# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip

# MSIE masquerades as Netscape, but it is fine
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# Don't compress MP3s

SetEnvIfNoCase Request_URI .(?:mp3)$ no-gzip dont-vary

# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary

</Location>

Now all is ok
=