Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: chris burnat on October 27, 2007, 02:41:19 PM
-
I need to add MIME types to an sme7.2 server to facilitate the use of *.asx files in the context of an html page used for streaming WMA encoded content. I have tried:
[root@test1 conf]# mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
[root@test1 conf]# cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
pico 75AddType01video.asx
[and added the following:]
#add mime support for asx files
AddType video/x-ms-asx .asx
AddType video/x-ms-asf .asx
[root@test1 httpd.conf]# expand-template /etc/httpd/conf/httpd.conf
[root@test1 httpd.conf]# /etc/rc7.d/S86httpd-e-smith restart
Restarting httpd-e-smith [ OK ]
The lines have been added to httpd.conf. Unfortunately the *.asx files I use to control the player at various bitrates are not loading. I suspect that the MIME types have not been added correctly.
Is this the correct way of adding MIME types to the server?
Is there a way to find out which MIME types the server support?
Thanks for any pointers, I am lost...
(Edited: spellos]
-
Here's a quote from Experts-Exchange:
Problem:
When placing .asx, .asf, .wma, and .wax files on a Web server
it is necessary to change the Web server's MIME type so that
client Web browsers understand how to handle these files. If no
MIME type is set for these file types, the MIME type sent from
the Web server to the browser is by default text/html, and that
is incorrect. This can cause your .asx or .wax files to show in
the browser window instead of starting the Windows Media Player.
Steps to set up Windows Media MIME types for Apache:
----------------------------------------------------
Step 1) Make sure you have server administration privileges.
Step 2) Change the folders to <apache_root>/httpd/conf. Edit the
Srm.conf file.
Step 3) Add the following lines of code to the end of the file,
or to the same location as the other AddType video/*
entries.
AddType video/x-ms-asf asf asx
AddType audio/x-ms-wma wma
AddType audio/x-ms-wax wax
NOTE: If you add these lines to the end of the file, make sure
the file ends with a blank line.
Step 4) Save your changes and close the editor.
Step 5) Restart the Web server.
If you still have the problem, post your srm.conf and the
behavior
I also found a sample mime.types file that includes 'asf' and 'asx' extensions: # various Micro$oft extensions
video/x-ms-asf asf asx
video/x-ms-wm wm
video/x-ms-wmv wmv
video/x-ms-wmx wmx
video/x-ms-wvx wvx
Both of these define only *one* new mime-type video/x-ms-asf and then assign it to both asf and asx.
-
Thanks for your reply mmccarn. My problem was that during the battle taking place over past 24 hours with MS applications (#$!!&*!), I had somehow corrupted the ASX files... There is also a fair amount of confusion with the syntax of MIME extensions, i.e. whether the extension itself should be preceded by a dot or not (AddType video/x-ms-asf asf asx versus AddType video/x-ms-asf .asf .asx). After fixing my *.asx files I ended up adding the following using the template method outlined in my first post:
[root@test1 httpd.conf]# cat 75AddType01video.asx
#add mime support for asx files
AddType video/x-ms-asf .asx .asf
AddType application/x-mplayer2 .asx
AddType audio/x-scpls .pls
AddType audio/mpeg .mp3
AddType audio/x-mpegurl .m3u
AddType audio/x-ms-wma .wma
AddType audio/x-ms-wax .wax
AddType video/x-ms-wmv .wmv
AddType video/x-ms-wvx .wvx
AddType video/x-ms-wmx .wmx
AddType application/ogg .ogm
AddType application/ogg .ogg
A bit of an overkill, but will get me ready to stream other formats later on.
All is well now.
-
There is also a fair amount of confusion with the syntax of MIME extensions, i.e. whether the extension itself should be preceded by a dot or not (AddType video/x-ms-asf asf asx versus AddType video/x-ms-asf .asf .asx).
It is such a nicre thing to have manual ;-) as the AddType directive (http://httpd.apache.org/docs/2.0/mod/mod_mime.html#addtype) instruction in the Apache manual (http://httpd.apache.org/docs/2.0/) states:
The extension argument is case-insensitive, and can be specified with or without a leading dot.
-
Thanks Cactus, I am now wiser and in peace.
Good information
Regards
chris