]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - config/gnump3d/gnump3d.conf
Added pptp stuff to red start script.
[people/pmueller/ipfire-2.x.git] / config / gnump3d / gnump3d.conf
CommitLineData
b5cf3c75
MT
1###
2# $Id: gnump3d.conf,v 1.23 2006/04/26 13:44:40 skx Exp $
3###
4#
5# This is the configuration file for GNUMP3d, the streaming MP3/OGG server.
6#
7# All lines beginning with '#' are comments and may be ignored.
8#
9###
10#
11# user = nobody # Some comment
12#
13# # The port to listen upon.
14# port=3333
15#
16###
17#
18# If you believe the documentation here is incomplete or misleading
19# please consider contributing an update - or reporting it as a bug.
20#
21# Comments on sensible defaults to ship this file with, or new options
22# should be sent to the author.
23#
24###
25#
26# Steve
27# ---
28# http://www.gnump3d.org/ - Website for this software, including
29# documentation and mailing lists.
30#
31# http://www.steve.org.uk/ - My homepage. Visit. Enjoy.
32#
33####
34
35
36
37
38###
39# Basic Server Settings
40####
41
42#
43# The port upon which we are going to serve. This may be any
44# port which is not already in use upon your machine.
45#
46# You may use a low port, for example 80, if you are running
47# as root - but that is only recommended if you make use of
48# the `user' option, which occurs later in this file.
49#
50port = 8888
51
52
53#
54# The following is the interface address that we wish to
55# bind upon.
56#
57# You'll only need set this if you are running this server upon
58# a machine which has multiple IP addresses and you wish to force
59# it to bind to a particular address.
60#
61# If you're not running this server on a machine with multiple
62# IP addresses, then please ignore this setting.
63#
64#
65# NOTE
66######
67#
68# If you just want to specify the name used in all the generated
69# links then you should be setting `hostname' instead.
70#
71# binding_host = 192.168.2.2
72#
73
74
75#
76# Set the hostname that is used in all the generated links.
77#
78# (This defaults to the name of the server machine, with no
79# domain suffix).
80#
81# You won't need this unless the machine which is serving on
82# MUST be accessed via its fully qualified domain name - for
83# example if you're running it on a machine which is accessible
84# to the world.
85#
86# NOTE
87######
88#
89# See `binding_host' if you have a machine which has multiple
90# IP addresses and you're trying to bind to one in particular.
91#
92# hostname = mp3d.foo.org
93#
94
95
96#
97# The root directory where we serve content from, this should be
98# the directory containing the MP3, OGG, or other media files that
99# you wish to share.
100#
101# Obviously the files which you wish to serve should be accessible
102# to the user who this server is running as - which is set via the
103# 'user' setting below.
104#
105# If you're on a multi-user system its probably a good idea to
106# make the audio files readable to other users anyway, share the
107# musical goodness!
108#
109root = /var/mp3
110
111
112#
113# This is the file which logs all MP3's / OGG's / directories
114# which clients access.
115#
116# If you start the server as root it's recommended that you use
117# a canonical location such as '/var/log' or '/var/adm', (because
118# your system will, probably, rotate files held there).
119#
120# If you're starting this server as a non-root user you should
121# change these locations to be a directory upon which you have write
122# permissions.
123#
124####
125#
126# IMPORTANT NOTE:
127#
128# If you want the song statistics to be displayed correctly
129# you MUST give the logfile as an absolute path - you must also
130# ensure that the logfile is readable to the user whom you are
131# running the server as.
132#
133####
134#
135# NOTE:
136#
137# This logfile is 100% apache logfile compatible so you may run any
138# Apache logfile processor upon it if you so wish.
139#
140# Simplistic statistics such as the most popular directories, songs,
141# and clients are available via the installed script 'gnump3d-top'
142# Run 'gnump3d-top --help' for details.
143#
144#
145####
146#
147logfile = /var/log/gnump3d/access.log
148
149
150#
151# Specify the format of the logfile, this may use any valid variables
152# which are defined in package "main".
153#
154#
155log_format = $connected_address - $user [$date] "GET $REQUEST" $HTTP_CODE $SERVED_SIZE "-" "$USER_AGENT"
156
157
158
159#
160# In the case of problems all output from the server will be sent
161# to an error log.
162#
163# This next option configures where that is
164#
165errorlog = /var/log/gnump3d/error.log
166
167
168
169#
170# This option allows you to specify additional arguments to the
171# statistics generating program 'gnump3d-top', and it's complete
172# path if you don't have it installed upon the $PATH of the user
173# who starts the server:
174#
175# stats_program = /usr/bin/gnump3d-top
176#
177#
178# For example you may change the default number of lines which are
179# reported from the default of 20 to 10 with this:
180#
181# stats_arguments = --count=10
182#
183# To hide the directories which are handled by the various plugins
184# you may use the '--hide' option.
185#
186# stats_arguments = --hide
187#
188# To read multiple logfiles, (eg to cope with files which have been
189# processed by logrotate), you could use:
190#
191# stats_arguments = --logfiles = /var/log/gnump3d/access.log*
192#
193# Combine the options if you wish, and see the gnump3d-top man-page
194# for details of more arguments
195#
196# stats_arguments = --count=40 --hide --logfiles=/var/log/gnump3d/access.log*
197#
198
199
200
201
202##
203# SECURITY OPTIONS.
204####
205
206#
207# If there is a user value setup below then the server will become that
208# user, after creating the listening socket and after opening the logfiles
209# for writing.
210#
211# If you want to run this server via init.d, (which has the effect of
212# starting the daemon as root), you should make sure you have this set
213# to an appropriate value.
214# Otherwise you will have the server running as root, which is clearly
215# not a good idea - even in the unlikely event that this application is
216# 100% bug free.
217#
218# You may comment the line out if you are running the daemon from your home
219# directory, and you are the only user with read access to the server root.
220# Although this is not recommended way of running the server.
221#
222# For the benefit of fellow computer users is recommended that you run the
223# server as a user such as 'nobody', and allow people read-only access to
224# your audio files.
225#
226user = nobody
227
228
229
230
231##
232# AUTHORISATION OPTIONS.
233####
234
235#
236# The following section allows you to specify which clients
237# are allowed to connect to your server.
238#
239# If you are leaving this server out on an Internet-accessible
240# machine then you will probably want to setup something here,
241# or at least make use of the password protection system.
242#
243# The following entries are commented out, so they have no effect,
244# but they should serve as good examples of the things which
245# are possible.
246#
247#
248# NOTE
249# ----
250#
251# Multiple settings are allowed - just separated them with ';'
252#
253#
254# Only people on the same subnet, (class C):
255# allowed_clients = 192.168.2.0/8
256#
257# People on the same class B:
258# allowed_clients = 10.0.0.0/16
259#
260# Only one person:
261# allowed_clients = 192.168.2.12
262#
263# Everybody
264# allowed_clients = all
265#
266# Nobody (!)
267# allowed_clients = none
268#
269# Everybody local, and one remote address:
270# allowed_clients = 192.168.2.0/8; 194.247.82.33
271#
272# Everybody local, and one remote range:
273# allowed_clients = 192.168.2.0/8; 194.237.82.0/8
274#
275#
276allowed_clients = all
277
278
279#
280# 'denied_clients' is the counterpart to allowed_clients - here
281# you can specify particular clients who are unable to browse your
282# music archive.
283#
284# Usage is identical to the allowed clients above; eg:
285#
286# denied_clients = 192.168.2.12; 192.168.2.25; 192.168.6.0/8
287#
288# denied_clients = none
289#
290
291
292##
293#
294# This section controls whether we will prompt clients for
295# a username and password prior to granting access to the
296# server.
297#
298# This is enabled by default; all you need to do is create
299# a password file in the MP3 directory called '.password'.
300#
301# (To disable this uncomment the 'enable_password_protection' line).
302#
303# The password file should be of the following format:
304#
305# username:password
306# username2:password2
307# ...:....
308# usernameN:passwordN
309#
310#
311# NOTE
312# ----
313#
314# The password file must be readable to the user the server is running
315# as.
316#
317###
318# enable_password_protection = 0
319###
320
321
322##
323#
324# Referrer check
325#
326##
327#
328# The last security option is the ability to block clients that don't
329# contain a specific 'Referrer:' header.
330#
331# Note that referrer protection isn't terribly reliable, as many clients
332# will not send a referrer header when making a connection. This is
333# especially likely when clients are connecting via a 'privacy enhancing'
334# proxy server; such as Internet Junkbuster, etc.
335#
336# Similarly malicious clients may deliberately stop sending referrers
337# if they realise what is going on.
338#
339#
340#
341###
342# If you wish to only allow a particular referring URL then specify it
343# here.
344# valid_referrers = http://somesite.com/
345
346
347##
348# SERVER FEATURES.
349####
350
351#
352# This next option controls what happens when you click upon a
353# single MP3 file.
354#
355# If always_stream is set to '1', and you click upon it you'll
356# actually get a .m3u (playlist) file containing a link to it -
357# the advantage of doing this is that you don't have to download
358# the file in its entirety to listen to it - it should start playing
359# immediately.
360#
361# If set to '0' the playlists will work via streaming, but selecting
362# an individual MP3 file will cause it to be downloaded to your local
363# machine prior to playing - one drawback of this is that playback
364# will probably not start until the entire file has downloaded.
365#
366always_stream = 1
367
368
369#
370# There is a link placed at the top of every directory, which allows you
371# to play the songs within that directory recursively.
372#
373# By default the recursive option plays all the tracks in a
374# sorted order - by uncommenting the following option you can
375# have the recursive playlists default to being in a random order.
376#
377# recursive_randomize = 1
378#
379
380#
381# This next setting controls the format of the playslist files.
382#
383# There are two formats this server supports, simple playlists which
384# are just plain listings of tracks, and advanced playlists which contain
385# copies of the song tags in comments.
386#
387# The advanced playlists will allow you to view song tag information
388# inside the playlist windows of both XMMS and WinAMP
389#
390#
391advanced_playlists = 1
392#
393
394
395
396##
397# Server Appearance Settings.
398####
399
400
401##
402#
403# All the output the server produces is generated with the help of
404# some HTML template files, these are referred to throughout the
405# program and each collection of templates is referred to collectively
406# as a 'theme'.
407#
408# This next option allows you to specify which theme should be used
409# by default. (Any client can select one of the available themes by
410# the use of cookies).
411#
412# For each theme there are a collection of HTML files which are read
413# and used for the server output. There are several basic files which
414# must be supplied to be considered a theme:
415#
416# index.html -> Used for displaying individual directories.
417# search.html -> Used for displaying the search form.
418# results.html -> Used for displaying the results of a search.
419# stats.html -> Used for customising the server statistics page.
420#
421# In addition to those each plugin reads in it's own template file
422# and uses that. For example the statistics plugin is accessed via
423# the URL http://server.host.name:port/stats/, and reads in a template
424# called 'stats.html'
425#
426# The theme directory defaults to /usr/share/gnump3d - but may be
427# changed via the 'theme_directory' setting given below.
428#
429# When the server is running you may set the theme from your browser
430# via the preferences page, simply visit the link:
431#
432# http://server.host.name:port/prefs
433#
434#
435# NOTE
436# ----
437#
438# If you create a theme I'd be happy to include it in future releases
439# if you wish - see the online theme creation docs at:
440#
441# http://www.gnump3d.org/theme.html
442#
443theme = Liquid
444
445
446
447##
448#
449# Set the base theme directory if you wish to place them in a non-standard
450# location.
451#
452##
453theme_directory = /usr/share/gnump3d/
454##
455
456
457
458##
459#
460# This next option controls how directories are displayed on the index
461# pages.
462#
463# There are several defined variables which you can choose to use:
464#
465# $LINK = The actual URL of the directory.
466#
467# $DIR_NAME = The name of the directory.
468#
469# $SONG_COUNT = The number of songs contained in the directory.
470#
471# $DIR_COUNT = The number of subdirectories in the directory.
472#
473# $RECURSE = A link to play the contents of the directory recursively.
474#
475# $NEW = Will insert the text specified by 'new_format' if the
476# directory is recently modified.
477#
478# NOTE: you can also specify "directory_format2" as an alternative display
479# format. Directories are then listed with alternating display formats.
480# This is useful if you want to have alternating background colors for
481# each entry in a table, for example.
482#
483directory_format = <tr><td width="10%">&nbsp;</td><td><a href="$LINK">$DIR_NAME</a> $NEW</td><td>$SONG_COUNT</td><td>$DIR_COUNT</td><td>[$RECURSE]</td></tr></a>
484
485#
486# directory_format = <tr><td><a href="$LINK">$DIR_NAME</a></td></tr>
487#
488# directory_format = <tr><td><a href="$LINK">$DIR_NAME</a></td></tr>
489#
490# directory_format = <tr><td><a href="$LINK">$DIR_NAME</a></td><td>[$RECURSE]</td></tr>
491#
492
493
494##
495# Text to insert if the directory is recently modified.
496##
497new_format = <font color="red"><b>New</b></font>
498
499##
500# If a directory hasn't been modifed in more than 'x' days then
501# it isn't considered 'new'.
502##
503new_days = 14
504
505
506##
507# File format
508##
509#
510# This option is analogous to the 'directory_format' option above.
511#
512# It specifies how the files should be listed.
513#
514# $LINK Is the link to the track itself
515#
516# $SONG_FORMAT Is a template string which is described below.
517#
518# NOTE: you can also specify "file_format2" as an alternative display
519# format. Files are then listed with alternating display formats.
520# This is useful if you want to have alternating background colors for
521# each entry in a table, for example.
522#
523file_format = <tr><td width="10%">&nbsp;</td><td><a href="$LINK">$SONG_FORMAT</a></td><td align="right">[<a href="/info$PLAINLINK">Info</a>] [<a href="$PLAINLINK">Download</a>]</td></tr>
524
525
526
527##
528#
529# This next setting, `song_format', allows you to configure how the
530# MP3 and OGG Vorbis files are displayed.
531#
532# If the file which has been found contains any tag information then
533# the following values will be available to you:
534#
535# $ARTIST -> The artist of the song.
536#
537# $ALBUM -> The album the song came from.
538#
539# $COMMENT -> The comment string attached to the song, if any.
540# NOT AVAILABLE FOR OGG FILES.
541#
542# $SONGNAME -> The name of the song.
543#
544# $YEAR -> The year the song was recorded.
545# NOT AVAILABLE FOR OGG FILES.
546#
547# $GENRE -> The genre of the track.
548# NOT AVAILABLE FOR OGG FILES.
549#
550# $BPS -> The sample rate of the song - if non-variable.
551# NOT AVAILABLE FOR OGG FILES.
552#
553# $LENGTH -> The length of the track in MM:SS
554# NOT AVAILABLE FOR OGG FILES, OR VBR MP3's.
555#
556# $SECONDS -> The length of the track in seconds
557# NOT AVAILABLE FOR OGG FILES, OR VBR MP3's.
558#
559# $SIZE -> The size of the audio stream.
560# NOT AVAILABLE FOR OGG FILES, OR VBR MP3's.
561#
562# $TRACK -> The number of the track
563#
564# $FILENAME will always be available. (This is the name of the file
565# without any suffix or directory information).
566#
567song_format = $TRACK - $ARTIST - $ALBUM - $SONGNAME [ $GENRE - $LENGTH / $SIZE ] $NEW
568
569
570
571##
572#
573# If you wish to change the text displayed on the 'Play'
574# link you should uncomment the following option, and change the
575# text appropriately.
576#
577##
578#
579# play_recursively_text = Play
580##
581
582
583##
584#
585# This next option controls how songs are sorted prior to display,
586# and used in the playlists.
587#
588# You may use any of the $ values which are listed above in
589# the 'song_format' setting, eg:
590#
591# Sort by the song name.
592# sort_order = $SONGNAME
593#
594# Sort by artist if present.
595# sort_order = $ARTIST
596##
597# Default to sorting by the track number, due to popular.
598sort_order = $TRACK
599
600
601
602
603
604##
605# DOWNSAMPLING / BIT RATE CHANGE
606##
607#
608# This support allows the music to be down-sampled before it is streamed
609# to clients. This will slow down the serving, and may be a little
610# processor intensive - I guess it will depend upon the speed of your
611# server, and the number of users you have.
612#
613##
614#
615# Is downsampling support enabled?
616#
617# If this is disabled then none of the further downsampling options will
618# apply, even if they are set.
619#
620# Also note that if the downsampling support is disabled the preferences
621# page will not allow the clients to select their own bitrate.
622#
623# (I think this makes sense, if it's disabled it's misleading to present
624# configuration options to the clients).
625#
626# downsample_enabled = 1
627#
628
629##
630#
631# YOU MUST UNCOMMENT THESE LINES
632#
633# Downsampling is based upon IP address, rather than enabled globally
634# this allows you to control things a little more tightly than user
635# preferences.
636#
637# For example on a gateway machine you'd want all people on the internal
638# LAN to have full quality files, and people remote to have the lower
639# quality sounds.
640#
641# The next two settings specify the downsampling ranges:
642#
643# downsample_clients = ALL
644# no_downsample_clients = 192.168.0.0/24
645#
646# NOTE: 'no_downsample_clients' takes precedence over 'downsample_clients'.
647#
648# Here are some examples, notice that you can use either single IP
649# addresses, ranges, 'NONE' or 'ALL'
650#
651#
652# Downsample Everybody:
653# downsample_clients = ALL
654# no_downsample_clients = NONE
655#
656# Downsample remote, allow local to have full quality
657# downsample_clients = ALL
658# no_downsample_clients = 192.168.0.0/24
659#
660# Downsample all except two addresses
661# downsample_clients = ALL
662# no_downsample_clients = 192.168.0.162; 192.168.0.33
663#
664# Full quality for all local, except one address
665# downsample_clients = 192.168.0.99
666# no_downsample_clients = 192.168.0.0/24
667#
668##
669
670##
671#
672# YOU MUST UNCOMMENT THESE LINES
673#
674#
675# For each of the downsampling levels the user has chosen the selected
676# file will be processed by a command.
677#
678# This command is assumed to write it's output directly to STDOUT.
679#
680# The following options specify the command line to run, note that
681# the string '$FILENAME' will be replaced by the file the user is
682# requesting.
683#
684# Note:
685#
686# If you wish to downsample or convert any other file types you
687# need to add entries to this file to specify what is done to them
688# simply create an entry which looks like:
689#
690# downsample_"level"_"file suffix" = command args
691#
692#downsample_high_mp3 = /usr/bin/lame --mp3input -b 56 $FILENAME -
693#downsample_medium_mp3 = /usr/bin/lame --mp3input -b 32 $FILENAME -
694#downsample_low_mp3 = /usr/bin/lame --mp3input -b 16 $FILENAME -
695#
696#downsample_high_ogg = /usr/bin/sox -t ogg $FILENAME -t raw - | oggenc --raw --downmix -b 96 -
697#downsample_medium_ogg = /usr/bin/sox -t ogg $FILENAME -t raw - | oggenc --raw --downmix -b 64 -
698#downsample_low_ogg = /usr/bin/sox -t ogg $FILENAME -t raw - | oggenc --raw --downmix --resample 22050 -b 32 -
699#
700
701#
702# If you always want to force a particular bitrate upon clients who've
703# not chosen something different then specify it here:
704#
705# default_quality = medium
706
707#
708#
709##
710
711
712
713
714
715####
716# Plugin control
717##
718
719#
720# Several of the servers features are controlled via external plugins,
721# these are simple Perl scripts which are called by the server in response
722# to requests.
723#
724# This next setting allows you to change the location from which the
725# plugins are loaded.
726#
727# plugin_directory = /usr/lib/perl5/gnump3d/plugins
728#
729#
730# NOTE: the following directory should be correctly filled in by
731# the installation script - if this doesn't happen report this as
732# a bug.
733#
734plugin_directory = /usr/lib/perl5/5.8.8/gnump3d/plugins
735#
736
737
738#
739# Plugin-Specific settings here.
740#
741
742
743#
744# Directories to exclude when choosing a random directory. Seperate
745# multiple directories with a '|' character.
746#
747# plugin_random_exclude = Talk|Midi|Video
748
749#
750##
751# End Plugin Control
752####
753
754
755
756##
757# HACKING - atypical configuration follows, this will not be of
758# interest to casual users.
759#
760# Dragons lie yonder ... ->
761#
762#####
763
764#
765# When files are served there needs to be an appropriate mime type
766# sent along with them, this allows the browser to pass the response
767# back to an MP3 player, etc.
768#
769# Most Unix systems will have the file '/etc/mime.types' which is
770# used by default. If not point this next file to wherever your mime
771# types file is located:
772#
773mime_file = /etc/gnump3d/mime.types
774#
775#
776
777#
778# This next setting controls where the file types are looked up.
779# we support many audio, visual, and playlist files and to do this
780# we need to be able to lookup a file to determine what kind of
781# file it is.
782#
783# Here is the lookup file.
784file_types = /etc/gnump3d/file.types
785
786#
787#
788# In order to record which songs are currently being played the server
789# will create a temporary file containing that path of each file that
790# it is serving.
791#
792# The path under which these files are created in may be set here.
793#
794now_playing_path = /var/cache/gnump3d/serving
795
796
797#
798# As a speedup and optimisation song tag is read via a companion script
799# which is called 'gnump3d-index'. This will be run automatically when
800# the server starts if possible.
801#
802# This next setting controls where that script will write its tag database
803# to.
804#
805tag_cache = /var/cache/gnump3d/song.tags
806
807#
808# This next setting allows you to control the path to the gnump3d-index
809# script which is used, as explained above.
810#
811# Normally you shouldn't need to touch this.
812#
813# index_program = /usr/bin/gnump3d-index
814
815
816#
817# This setting controls whether we should stream song title
818# information in shoutcast format.
819#
820# If your client supports it then you should enable it, otherwise
821# not.
822#
823# (This works correctly on WinAmp, and XMMS.)
824#
825shoutcast_streaming = 1
826
827
828#
829# By default the server logfile is appended to when we start.
830#
831# If you set the following value to '1' the logfile will be truncated
832# instead.
833#
834# You might want to truncate the file to save space, but doing this
835# renders the server statistics less useful.
836#
837# truncate_log_file = 0
838
839
840#
841# By default the server will close a connection it receives if it
842# hasn't received a valid request after 10 seconds.
843#
844# Here you may change this timeout value.
845#
846# read_time = 10
847
848
849
850#
851# This next section controls whether we present a HTML interface
852# to the server.
853#
854# In most situations you will want to do this - but some people have
855# approached me and suggested that it should be tweakable, so here's
856# the option to disable the browsing of the music
857#
858# If you set this to '0' the best you can probably do is call
859# 'http://server:port/recurse.m3u' - or similar.
860#
861# enable_browsing = 1
862
863
864#
865# This next value controls whether we should believe, and use, the
866# client supplied 'Host:' header.
867#
868# This header is sent by HTTP/1.1 clients only, and could be spoofed.
869# You'll only NEED to use it if tunnelling over SSH or performing similar
870# magic.
871#
872# It's enabled here because I don't believe it should cause any real harm
873# YMMV.
874#
875use_client_host = 1
876
877
878##
879#
880# Set this option to rewrite the hostname:port combination in the URLs in
881# your playlist. Most people won't need this unless they are proxying
882# their connection or running multiple streaming servers through a load
883# balancer or DNS rotor.
884#
885# Note: If you set this you will almost certainly need to set
886# "use_client_host=0"
887##
888# host_rewrite = ""
889
890
891##
892#
893# This is an experimental feature - ignore it.
894#
895# It does not work.
896#
897# Ignore it: You are not expected to understand this (I've always wanted
898# to leave that as a comment somewhere ;)
899#
900##
901#
902# jukebox_mode = 1
903# jukebox_player = /usr/bin/mpg123 $FILENAME
904#
905##
906
907
908##
909#
910# Make it possible to hide song tags, and just display filenames.
911#
912##
913# hide_song_tags = 0
914
915##
916#
917# Make it possible to disable the tag cache altogether, to save memory.
918#
919##
920# disable_tag_cache = 0
921
922
923##
924#
925# This option allows you to insert a custom META-tag inside the header of
926# each page which is output.
927#
928# You can add whatever you like here, perhaps the most useful thing to
929# add is an encoding type.
930#
931# add_meta_tag = <meta name="author" value="Steve Kemp" />
932# add_meta_tag = <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
933##
934
935
936##
937# End Of Hacking Section
938####
939
940
941
942##
943# End of gnump3d.conf
944####