Reputation:
I am running Apache on Linux, and when I go to a url that is a .mp4 file rather than let me download the file it shows the contents of the file (as mangled text)
eg the out put is
��� ftypisom���isomiso2avc1mp41��*moov���lmvhd����̴�d̴�d��������������������������������������������������@��������������������������������Htrak���\tkhd���̴�d̴�d��������������������������������������������������������@������������$edts���elst��������������������mdia��� mdhd����̴�d̴�d���� ��������-hdlr��������vide������������VideoHandler���kminf���vmhd��������������
How do I make Apache serve it correctly?
Upvotes: 1
Views: 4368
Reputation: 33531
Add a AddType
directive:
AddType video/mp4 .mp4
This will cause Apache to send the correct headers to your browser, which will then select the correct method to download or play the media file.
Make sure you have mod_mime
installed and activated (but I reckon it is by default; I never had any issues with this).
More information here: http://httpd.apache.org/docs/2.2/mod/mod_mime.html
Upvotes: 2