CentOS 5.2,Apache 2.2.3
配置Apache打开Apache 配置文件httpd.conf,位置参考:/etc/httpd/conf/httpd.conf
在配置文件中确保mod_write、mod_mime 模块已加载:
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule mime_module modules/mod_mime.so
随后在配置文件中加入MIME 信息(经测试不加也能运行SL):
AddType application/xaml+xml .xaml
AddType application/x-silverlight-app .xap
AddType application/x-ms-xbap .xbap
保存httpd.conf,并退出编辑模式,重启Apache 服务:
service httpd restart
加载Silverlight由于SL 是客户端运行,所以Server 上其实不用做太多设置,下面将xap 程序加载到HTML即可。新建一个PHP 程序加入下面代码:
< data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="500px">相关资料
Silverlight Mime types in IIS6 and Apache
Run Silverlight with Apache Server (Under linux)
How to: Add Silverlight to a Web Page by Using HTML
转载:http://www.cnblogs.com/gnielee/archive/2011/04/06/silverlight-on-apache-linux.html
没有评论:
发表评论