Assembla home | Assembla project page
 

Serving other files with Sage Web Server

The webserver can serve any files on your system, all you need to do is build a directory structure under the SageTV/webserver/webroot directory containing these files.

If you want to serve files in a different directory/disk, then you can use the SageTV/webserver/aliases.properties file to define web-aliases to other locations on your system. for example:

from=/Pictures;dir=d:\Pictures

You can also add lines to the SageTV/webserver/realms.properties file to define usernames/passwords for these new paths:

My Pictures=/Pictures,private:password

If you want to serve files that are hosted on another system, use the UNC path (\\host\share) to the directory in the aliases.properties. Remember that if you use the SageTV Service, it cannot access mounted network drives by drive letter, and it can only access UNC paths if you run the service as a real user, not LocalSystem.

If you want to serve large files, then you may want to limit the bandwidth used so that it does not swamp your network connection. You can do this with the SageTV/webserver/throttles.properties file. This defines the maximum amount of bandwith used for certain files or directories... Add lines to this file such as:

   *.jpg|*.gif     50000   # limit images to 50kbps
   *.mpg           20000   # and movies to even less
   music/*         20000   # slow all music file downloads

If you really want to, you can also run cgi-bin web scripts by defining a path in the sage.properties item: nielm/webserver/cgibin_dir=cgi-bin and putting executable files in the directory webserver/webroot/cgi-bin

You can also write your own Java servlets and add them to the webserver by specifying them in the webserver/servlets.properties file