### # $Id: gnump3d.conf,v 1.11 2004/04/15 18:20:54 skx Exp $ ### # # This is the config file for GNUMP3d, the streaming MP3/OGG server. # # All lines beginning with '#' are comments and may be ignored. # ### # # Values may span multiple lines if they are terminated with a # '\' character. # # The '\' MUST be the last character upon the line, the following examples # show valid, correct, entries: # # user = nobody # Some comment # # # The port to listen upon. # port=3333 # # directory_format = some \ # really \ # really \ # long string # # ### # # 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 # --- # https://www.gnump3d.org/ - Website for this software, including # discussion forums and mailing lists. # # https://www.steve.org.uk - My homepage. Visit. Enjoy. # #### ### # 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 addresses 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 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 accessible # to the user who this server is running as - which is set via the # 'user' setting below. # # If you're on a multi-user system its probably a good idea to # make the audio files readable to other users anyway, share the # musical goodness! # root = /home/music # # This is the file which logs all MP3's / OGG's / directories # which clients access. # # 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). # # If you're starting this server as a non-root user you should # change these locations to be a directory upon which you have write # permissions. # #### # # 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 readable to the user whom you are # running the server as. # #### # # NOTE: # # This logfile is 100% apache logfile compatible so you may run any # Apache logfile processor upon it if you so wish. # # Simplistic statistics such as the most popular directories, songs, # and clients are available via the installed script 'gnump3d-top' # Run 'gnump3d-top --help' for details. # # #### # logfile = /var/log/gnump3d/access.log # # Specify the format of the logfile, this may use any valid variables # which are defined in package "main". # # log_format = $connected_address - $user [$date] "GET $REQUEST" $HTTP_CODE $SERVED_SIZE "-" "$USER_AGENT" # # In the case of problems all output from the server will be sent # to an error log. # # This next option configures where that is # errorlog = /var/log/gnump3d/error.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/bin/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 hide the directories which are handled by the various plugins # you may use the '--hide' option. # # stats_arguments = --hide # # 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 options if you wish, and see the gnump3d-top man-page # for details of more arguments # # stats_arguments = --count=40 --hide --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% bug free. # # You may comment the line out if you are running the daemon 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 = root ## # AUTHORISATION OPTIONS. #### # # 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-accessible # machine then you will probably want to setup something here, # or at least make use of the password protection system. # # The following entries are commented out, so they have no effect, # but they should serve as good examples of the things which # are possible. # # # NOTE # ---- # # Multiple settings are allowed - just separated them with ';' # # # Only people on the same subnet, (class C): # allowed_clients = 192.168.2.0/8 # # People on the same class B: # allowed_clients = 10.0.0.0/16 # # 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.0/8; 194.247.82.33 # # Everybody local, and one remote range: # allowed_clients = 192.168.2.0/8; 194.237.82.0/8 # # 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.0/8 # # denied_clients = none # ## # # 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 ### ## # # Referrer check # ## # # The last security option is the ability to block clients that don't # contain a specific 'Referrer:' header. # # Note that referrer protection isn't terribly reliable, as many clients # will not send a referrer header when making a connection. This is # especially likely when clients are connecting via a 'privacy enhancing' # proxy server; such as Internet Junkbuster, etc. # # Similarly malicious clients may deliberately stop sending referrers # if they realise what is going on. # # # ### # If you wish to only allow a particular referring URL then specify it # here. # valid_referrers = https://somesite.com/ ## # SERVER FEATURES. #### # # 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 entirety to listen to it - it should start playing # immediately. # # If set to '0' the playlists 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 is a link placed at the top of every directory, which allows you # to play the songs within that directory 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 # # # This next setting controls the format of the playslist files. # # There are two formats this server supports, simple playlists which # are just plain listings of tracks, and advanced playlists which contain # copies of the song tags in comments. # # The advanced playlists will allow you to view song tag information # inside the playlist windows of both XMMS and WinAMP # # advanced_playlists = 1 # ## # Server Appearance Settings. #### ## # # All the output the server produces is generated with the help of # some HTML template files, these are referred to throughout the # program and each collection of templates is referred to collectively # as a 'theme'. # # 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 a collection of HTML files which are read # and used for the server output. There are several basic files which # must be supplied to be considered a theme: # # 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. # stats.html -> Used for customising the server statistics page. # # In addition to those each plugin reads in it's own template file # and uses that. For example the statistics plugin is accessed via # the URL https://server.host.name:port/stats/, and reads in a template # called 'stats.html' # # The theme directory defaults to /usr/share/gnump3d - but may be # changed via the 'theme_directory' setting given below. # # When the server is running you may set the theme from your browser # via the preferences page, simply visit the link: # # https://server.host.name:port/prefs # # # 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: # # https://gnump3d.sourceforge.net/theme.html # theme = Tabular ## # # Set the base theme directory if you wish to place them in a non-standard # location. # ## 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. # # $RECURSE = A link to play the contents of the directory recursively. # # NOTE: you can also specify "directory_format2" as an alternative display # format. Directories are then listed with alternating display formats. # This is useful if you want to have alternating background colors for # each entry in a table, for example. # directory_format =