### # $Id: gnump3d.conf,v 1.29 2002/11/12 13:30:54 stevekemp Exp $ ### # # This is the config file for GNUMP3d, the streaming MP3/OGG server. # # All lines beginning with '#' are comments and may be ignored. # ### # # If you believe the documentation here is incomplete or misleading # please consider contributing an update - or reporting it as a bug. # # Comments on sensible defaults to ship this file with, or new options # should be sent to the author. # ### # # Steve # --- # http://www.gnump3d.org/ - Website for this software, including # discussion forums and mailing lists. # #### ### # Basic Server Settings #### # # The port upon which we are going to serve this may be any # port which is not already in use upon your machine. # # You may use a low port, for example 80, if you are running # as root - but that is only recommended if you make use of # the `user' option, which occurs later in this file. # port = 8888 # # The following is the interface address that we wish to # bind upon. # # You'll only need set this if you are running this server upon # a machine which has multiple IP addresse and you wish to force # it to bind to a particular address. # # If you're not running this server on a machine with multiple # IP addresses, then please ignore it this setting. # # NOTE # ---- # # If you just want to specify the name used in all the generated # links then you should be setting `hostname' instead. # # binding_host = 192.168.2.2 # # Set the hostname that is used in all the generated links. # # (This defaults to the name of the server machine, with no # domain suffix). # # You won't need this unless the machine which is serving on # MUST be accessed via its fully qualified domain name - for # example if you're running it on a machine which is accessible # to the world. # # NOTE # ---- # # See `binding_host' if you have a machine which has multiple # IP addresses and you're trying to bind to one in particular. # # hostname = mp3d.foo.org # # # The root directory where we serve content from, this should be # the directory containing the MP3, OGG, or other media files that # you wish to share. # # Obviously the files which you wish to serve should be accessable # to the user who this server is running as. # # If you're on a multi-user system its probably a good idea to # make the audio files readable to other users anyway... # root = /var/lib/gnump3d # # This is the file which record all MP3's / OGG's / directories # which clients browse. # # By default logging is to a local file, because most GNU/Linux, # and Unix systems will not allow normal users to write to "/var/log", # you should either start the server as root or change the location of # the logfile.. # # If you start the server as root it's recommended that you use # a canonical location such as '/var/log' or '/var/adm', (because # your system will, probably, rotate files held there). # #### # # IMPORTANT NOTE: # # If you want the song statistics to be displayed correctly # you MUST give the logfile as an absolute path - you must also # ensure that the logfile is accessible to the user whom you are # running the server as. # #### # # NOTE: # # As of GNUMP3d v1.0 this logfile is 100% apache logfile compatable # so you may run any Apache logfile processor upon it if you so wish. # # (If you are upgrading its probably best to delete your old logfile # before processing - as the older logfiles won't have all the information # in them and your statistics will be skewed). # logfile = /var/log/gnump3d/access.log # # This option allows you to specify additional arguments to the # statistics generating program 'gnump3d-top', and it's complete # path if you don't have it installed upon the $PATH of the user # who starts the server: # stats_program = /usr/sbin/gnump3d-top # # # For example you may change the default number of lines which are # reported from the default of 20 to 10 with this: # stats_arguments = --count=10 # # # To read multiple logfiles, (eg to cope with files which have been # processed by logrotate), you could use: # # stats_arguments = --logfiles = /var/log/gnump3d/access.log* # # Combine the two if you wish: # # stats_arguments = --count=40 --logfiles=/var/log/gnump3d/access.log* # ## # SECURITY OPTIONS. #### # # If there is a user value setup below then the server will become that # user, after creating the listening socket and after opening the logfiles # for writing. # # If you want to run this server via init.d, (which has the effect of # starting the daemon as root), you should make sure you have this set # to an appropriate value. # Otherwise you will have the server running as root, which is clearly # not a good idea - even in the unlikely event that this application is # 100% bugfree. # # You may comment the line out if you are running the deamon from your home # directory, and you are the only user with read access to the server root. # Although this is not recommended way of running the server. # # For the benefit of fellow computer users is recommended that you run the # server as a user such as 'nobody', and allow people read-only access to # your audio files. # user = gnump3d # # The following section allows you to specify which clients # are allowed to connect to your server. # # If you are leaving this server out on an internet-accessable # machine then you will probably want to setup something here, # or make use of the password protection section. # # The following entries are commented out, so they have no effect, # they should serve as good examples of the things which are possible. # # # NOTE # ---- # # Multiple settings are allowed - just seperated them with ';' # # # Only people on the same subnet, (class C): # allowed_clients = 192.168.2.x # # People on the same class B: # allowed_clients = 10.0.x.x # # Only one person: # allowed_clients = 192.168.2.12 # # Everybody # allowed_clients = all # # Nobody (!) # allowed_clients = none # # Everybody local, and one remote address: # allowed_clients = 192.168.2.x; 194.247.82.33 # # Everybody local, and one remote range: # allowed_clients = 192.168.2.x; 194.237.82.x # # allowed_clients = all # # 'denied_clients' is the counterpart to allowed_clients - here # you can specify particular clients who are unable to browse your # music archive. # # Usage is identical to the allowed clients above; eg: # # denied_clients = 192.168.2.12; 192.168.2.25; 192.168.6.x # # denied_clients = none # # # This next setting controls how many clients are allowed to # be connected at any given moment. # # This should be used if you are setting this server up on # a publically accessible IP address - if you are worried about # your bandwidth consumption. # # NOTE # ---- # By default connection numbers are unlimitted. # # maximum_connections = 5 ## # # This section controls whether we will prompt clients for # a username and password prior to granting access to the # server. # # This is enabled by default; all you need to do is create # a password file in the MP3 directory called '.password'. # # (To disable this uncomment the 'enable_password_protection' line). # # The password file should be of the following format: # # username:password # username2:password2 # ...:.... # usernameN:passwordN # # # NOTE # ---- # # The password file must be readable to the user the server is running # as. # ### # enable_password_protection = 0 ### ## # Server Feature Settings. #### # # This next option controls what happens when you click upon a # single MP3 file. # # If always_stream is set to '1', and you click upon it you'll # actually get a .m3u (playlist) file containing a link to it - # the advantage of doing this is that you don't have to download # the file in its entirity to listen to it. # # If set to '0' the playlists "All", and "Recurse" will work via # streaming, but selecting an individual MP3 file will cause it # to be downloaded to your local machine prior to playing. # - one drawback of this is that playback will probably not start # until the entire file has downloaded. # always_stream = 1 # # There are two links which are placed at the top level of the # display - and inside every directory. # # One plays all the files and one plays the contents recursively. # # By default the recursive option plays all the tracks in a # sorted order - by uncommenting the following option you can # have the recursive playlists default to being in a random order. # # # recursive_randomize = 1 # ## # Server Appearence Settings. #### ## # # All the output the server produces is generated with the help of # some HTML template files, these are referred to throught the program # as themes. # # This next option allows you to specify which theme should be used # by default. (Any client can select one of the available themes by # the use of cookies). # # For each theme there are five template files - which you are # free to customize to your tastes: # # index.html -> Used for displaying individual directories. # search.html -> Used for displaying the search form. # results.html -> Used for displaying the results of a search. # plugin.html -> A general purpose file which any plugin may use. # stats.html -> Used for customizing the server statistics page. # status.html -> Used for customizing the server options display. # # These files are contained in a theme directory, by setting the # theme variable below you specify which set of templates you wish # the server to use. # # The theme directory defaults to $PREFIX/etc/gnump3d - but may be # changed via the 'theme_directory' setting given below. # # eg. To use the templates in '$PREFIX/etc/gnump3d/simple/' then you # should set 'theme=simple' # # To use the templates in '$PREFIX/etc/gnump3d/twin/' then you # should set 'theme=twin' # # When the server is running you may set the theme from your browser # via the theme choosing plugin. Simply visit the link: # # http://server.host.name:port/themes/ # # # NOTE # ---- # # If you create a theme I'd be happy to include it in future releases # if you wish - see the online theme creation docs at: # # http://gnump3d.sourceforge.net/theme.html # theme = default ## # # Set the base theme directory if you wish to place them in a non-standard # location. # ## # OE: put no trailing slash here... theme_directory = /usr/share/gnump3d ## # # This next option controls how directories are displayed on the index # pages. # # There are several defined variables which you can choose to use: # # $LINK = The actual URL of the directory. # # $DIR_NAME = The name of the directory. # # $SONG_COUNT = The number of songs contained in the directory. # # $DIR_COUNT = The number of subdirectories in the directory. # # $ALL = A link to play the contents of the directory. # # $RECURSE = A link to play the contents of the directory recurisvely. # # directory_format = <tr><td width="10%"> </td><td><a href="$LINK">$DIR_NAME</a><td><td>$SONG_COUNT</td><td>$DIR_COUNT</td><td>[$ALL]</td><td>[$RECURSE]</td></tr> # # directory_format = <tr><td><a href="$LINK">$DIR_NAME</a></td></tr> # # directory_format = <tr><td><a href="$LINK">$DIR_NAME</a></td></tr> # # directory_format = <tr><td><a href="$LINK">$DIR_NAME</a></td><td>[$ALL]</td><td>[$RECURSE]</td></tr> # ## # # This next setting, `song_format', allows you to configure how the # MP3 and OGG Vorbis files are displayed. # # If the file which has been found contains any tag information then # the following values will be available to you: # # $ARTIST -> The artist of the song. # # $ALBUM -> The album the song came from. # # $COMMENT -> The comment string attatched to the song, if any. # NOT AVAILABLE FOR OGG FILES. # # $SONGNAME -> The name of the song. # # $YEAR -> The year the song was recorded. # NOT AVAILABLE FOR OGG FILES. # # $GENRE -> The genre of the track. # NOT AVAILABLE FOR OGG FILES. # # $BPS -> The sample rate of the song - if non-variable. # NOT AVAILABLE FOR OGG FILES. # # $LENGTH -> The length of the track in HH:MM:SS # NOT AVALABLE FOR OGG FILES, OR VBR MP3's. # # $TRACK -> The number of the track # # $FILENAME will always be available. (This is the name of the file # without any suffix or directory information). # song_format = $TRACK - $ARTIST - $ALBUM - $SONGNAME [ $LENGTH ] ## # Sorting option. # ## # # This next option controls how songs are sorted prior to display, # and use in the playlists. # # You may use any of the $FOO values which are listed above in # the 'song_format' setting, eg: # # Sort by track number # sort_order = $TRACK # # Sort by artist # sort_order = $ARTIST ## sort_order = $SONGNAME ## # Downsampling / Bitrate recoding ## # # This support is currently in prototype stage - it's working but you'll # need to tweak it carefully. # ## # # Is downsampling support enabled? # # If this is disabled then none of the further downsampling options will # apply, even if they are set. # # downsample_enabled = 1 # # # Hosts for which no downsampling should ever be done. # # These hosts are never downsampled, as the name might suggest # they are specified exactly as hosts in the 'allowed_clients' # option. # # downsample_localhosts = 192.168.x.x; 10.0.x.x # # Hosts for which downsampleing should always be done. # # downsample_remotehosts = all # # Bitrate to use for remote clients which are always downsampled. # # downsample_remotehosts_rate = 56 # # The program to use for downsampling. Must have lame compatible # command line arguments. # # This is a rough example of what it would look like. # # $FILENAME is the local path to the file which should be downsampled # # $BITRATE Is the remotehosts_rate specified above. # # downsample_binary = /usr/bin/lame # # downsample_args = --mp3input --resample 32 -b $BITRATE "$FILENAME" - # # # ## ## # File format ## # # This option is analogous to the 'directory_format' option above. # # It specifies how the files should be listed. # file_format = <tr><td width="10%"> </td><td><a href="$LINK">$SONG_FORMAT</a></td></tr> ## # # If you wish to change the text displayed on the 'Play All' # link, or the 'Play Recursively' link you should uncomment the # following two options, and change the text appropriately. # ## # # play_all_text = Play All # play_recursively_text = Play Recursively ## ## # End Appearence Settings. #### #### # Plugin control ## # # Several of the servers features are controlled via external plugins, # these are simple shared libraries which implement our plugin interface. # # By default all the plugins which have been found will be loaded, here # you may individually switch them off. # # Note # ---- # If you switch off a plugin you may find certain links in the default # theme collections don't work. # # # # For each plugin there is a switch 'plugin_foo' which will stop # the plugin named 'foo.so' from being loaded. # # Simply uncomment the relevent option to disable that plugin # # The bug reporting plugin # plugin_bug = disabled # The 'most recent tracks' plugin # plugin_last20 = disabled # The 'custom playlist generation' plugin # plugin_playlist = disabled # The search plugin # plugin_search = disabled # The statistics plugin # plugin_stats = disabled # The theme browsing plugin # plugin_theme = disabled # The version displaying plugin # plugin_version = disabled # ## # End Plugin Control #### ## # HACKING - atypical configuration follows, this will not be of # interest to casual users. # # Dragons lie yonder ... -> # ##### # # This setting controls whether we should stream song title # information in shoutcast format. # # If your client supports it then you should enable it, otherwise # not. # # (This works correctly on WinAmp, and XMMS.) # shoutcast_streaming = 1 # # By default the server logfile is appended to when we start. # # If you set the following value to '1' the logfile will be truncated # instead. # # You might want to truncate the file to save space, but doing this # renders the server statistics less useful. # # truncate_log_file = 0 # # This next section controls whether we present a HTML interface # to the server. # # In most situations you will want to do this - but some people have # approached me and suggested that it should be tweakable, so here's # the option to disable the browsing of the music # # If you set this to '0' the best you can probably do is call # 'http://server:port/recurse.m3u' - or similar. # # enable_browsing = 1 # # This next value controls whether we should believe, and use, the # client supplied 'Host:' header. # # This header is sent by HTTP/1.1 clients only, and could be spoofed. # You'll only NEED to use it if tunneling over SSH or performing similar # magic. # # It's enabled here because I don't believe it should cause any real harm # YMMV. # use_client_host = 1 # # Paranoid setting from me, I believe it is correct to preserve the # suffixes of the shared libraries we load as plugins, however stripping # them off seems to work - and appears to be necessary for some systems. # # Enable the following setting if you want to keep the suffixes. # # OE: this has to enabled... plugin_keep_suffix = 1 # # Here you may adjust the size of the serving buffer which is used # when streaming to clients. # # stream_buffer_size = 8000 # # If this option is uncommented then much of the code will be mutex # protected. This will slow performance, but should ensure safety # under marginal conditions. # # paranoid_threading = 1 ## # End Of Hacking Section #### ## # End of gnump3d.conf ####