1	##############################################################
2	#                                                            #
3	#     CONFIGURATION FILE FOR THE MOTSOGNIR GOPHER SERVER     #
4	#                                                            #
5	# This configuration file controls how the motsognir gopher  #
6	# server should behave. Every option listed here can be      #
7	# overloaded through command-line. Example:                  #
8	#   $ motsognir --gopherport 7070                            #
9	#                                                            #
10	# motsognir can run without a config file at all, provided   #
11	# that it gets its configuration through command-line        #
12	# options. To disable the config file lookup, use the        #
13	# command-line --config parameter with an empty argument:    #
14	#   $ motsognir --config '' --gopherport 7070 etc            #
15	#                                                            #
16	##############################################################
17	
18	
19	## Server's hostname ##
20	# The hostname the gopher server is reachable at. This setting is highly
21	# recommended, because the gopher protocol is heavily relying on self-pointing
22	# links. If not declared, the server's IP address will be used instead.
23	GopherHostname=chate.io
24	
25	## Gopher TCP port ##
26	# The TCP port on which the public Gopher server listens on.
27	# Usually, gopher servers are published on port 70. Default: 70.
28	GopherPort=70
29	
30	## Bind on IP address ##
31	# Set this 'bind' parameter to the IP address you'd like Motsognir to listen
32	# on. Note, that this parameter must be either an IPv6 address, or an IPv4
33	# address written in IPv4-mapped IPv6 notation (for ex. "::FFFF:10.0.0.1").
34	# If not specified, Motsognir will listen on all available IP addresses.
35	# This setting might be useful if you have a multihomed server, and you would
36	# like to serve different content for each IP address.
37	# Examples:
38	#  bind=2001:DB8:135:A0E3::2
39	#  bind=::FFFF:192.168.0.3
40	bind=
41	
42	## Disable IPv6 support ##
43	# Set this to 1 to DISABLE IPv6 support within Motsognir. Please note that
44	# when IPv6 is enabled (which is the default), Motsognir may or may not listen
45	# to both IPv4 and IPv6 sockets. This is somewhat of a mess, and it is related
46	# to how your operating system treats IPv6 sockets. Most sane operating
47	# systems support dual-stack sockets. In such environments, Motsognir will
48	# open an IPv6 socket and mark it as "not-only-ipv6" (setting IPV6_BINDV6ONLY
49	# to false), thus instructing the operating system to accept both IPv4 and
50	# IPv6 packets on this socket. Unfortunately, some exotic systems are
51	# religiously against dual-stack sockets (as of 2019, I know about at least
52	# two such systems: OpenBSD and DragonFlyBSD). On these systems, an IPv6
53	# socket is unable to accept IPv4 packets, hence Motsognir ends up receiving
54	# exclusively IPv6 traffic. As a workaround for such systems, one should run
55	# two instances of Motsognir (one for each protocol). This means two separate
56	# configuration files: one with and one without the setting below being set.
57	disableipv6=1
58	
59	## Root directory ##
60	# That's the local path to Gopher resources. Note, that if you use a chroot
61	# configuration, you must provide here the virtual path instead of the real
62	# one.
63	# The default path is /var/gopher/
64	GopherRoot=/var/www/gopher/root/
65	
66	## Allowed public directories ##
67	# In specific situations, it may happen that you'd like to be able to serve
68	# files from outside of your gopher root (typically, if you used symlinks
69	# inside your gopher root, that points to other places of the file system).
70	# By default Motsognir won't allow such resources to be served, since requests
71	# that try to access anything outside of the gopher root are considered as
72	# potentially malicious. However, if you do want to serve content from outside
73	# your gopher root, then fill in below the list of directories that are
74	# allowed to be served. Items of this list should be separated by a ':' char.
75	# Example: PubDirList=/srv/files:/var/lib/stuff:/tmp
76	PubDirList=
77	
78	## User home directories ##
79	# If you'd like to serve gopher content from user directories, using the
80	# classic /~user/ URL scheme, then define the user directories location here
81	# below. The configured location must contain a '%s' tag, which will be
82	# substituted with the username by motsognir. This must be an absolute path.
83	# If nothing is configured, then support for serving content from user
84	# directories won't be available. Example:
85	# UserDir=/home/%s/public_gopher/
86	UserDir=
87	
88	## chroot configuration ##
89	# If you'd like to put Motsognir inside a chroot jail, configure here the
90	# chroot directory that shall be used. By default no chroot is used.
91	chroot=
92	
93	## Paranoid mode ##
94	# For paranoidal security, you might want to enable "Paranoid mode". In this
95	# mode, Motsognir accepts to serve only files with permissions set to "world
96	# readable".
97	# Possible values: 0 (disabled) or 1 (enabled). Disabled by default.
98	ParanoidMode=1
99	
100	## Plugin ##
101	# Power-admins might want to craft some additional logic into Motsognir. This
102	# is possible using a 'plugin', ie. a simple application or php script that
103	# Motsognir will submit incoming queries to. The plugin can decide whether or
104	# not it wants to handle a given query (if not, then Motsognir will process it
105	# as usual. The queries that Motsognir will submit to the plugin can be
106	# filtered by using a 'PluginFilter'. This is a 'POSIX extended' regular
107	# expression that will be compared to every incoming query, and only matching
108	# queries are submitted to the plugin. Read more in the manual.
109	Plugin=
110	PluginFilter=
111	
112	## Activate the verbose mode ##
113	# Here you can enable/disable the verbose mode. In verbose mode, Motsognir
114	# will generate much more logs. This is useful only in debug situations.
115	# Possible values: 0 (disabled) or 1 (enabled). Disabled by default.
116	Verbose=0
117	
118	## Syslog facility ##
119	# Motsognir logs all its messages through the LOG_DAEMON syslog facility by
120	# default. In some situations you may want to change the logging facility to
121	# a custom one. Setting LogFacility to an integer between 0 and 7 will make
122	# motsognir log its messages through the syslog facility LOCAL0-LOCAL7.
123	LogFacility=
124	
125	## CGI support ##
126	# The line below enables/disables CGI support. Read the manual for details.
127	# Possible values: 0 (disabled) or 1 (enabled). Disabled by default.
128	GopherCgiSupport=1
129	
130	## PHP support ##
131	# There you can enable PHP support.
132	# Possible values: 0 (disabled) or 1 (enabled). Disabled by default.
133	GopherPhpSupport=0
134	
135	## Sub-gophermap scripts ##
136	# If you'd like to use sub-gophermap scripts in your gophermaps, set
137	# SubGophermaps.
138	# Possible values: 0 (disabled) or 1 (enabled). Disabled by default.
139	SubGophermaps=1
140	
141	## Period-stuffing and period-terminator for text files ##
142	# RFC 1436 mandates that text files returned by a gopher server must feature
143	# a dot terminator (a single period on a line on its own), and that any dot
144	# appearing at the start of a line shall be doubled.
145	# Many (most?) gopher clients do not follow these requirements, and fail to
146	# process such extra periods. Enabling 'NoTxtPeriod' will prevent motsognir
147	# from adding any such periods. Please note that while this may have a
148	# practical value, it is a blatant violation of RFC 1436.
149	NoTxtPeriod=0
150	
151	## Secondary URL-delimiting char
152	# By default, only the '?' char is recognized as a delimiter between an
153	# object and the query that must be run on the object. With this parameter,
154	# you can define an additional character that will be equivalent to '?'. This
155	# character must be provided in a numerical form, as an ASCII value.
156	# Example for the hash (#) character:
157	# SecUrlDelim=35
158	SecUrlDelim=
159	
160	## Run as another user ##
161	# If you start motsognir under a root account, you might want to configure
162	# it so it drops root privileges as soon as it doesn't need them anymore and
163	# switches to another user. This is recommended for increased security,
164	# unless you already run Motsognir as a non-root user. To do so, provide here
165	# the username of the user that Motsognir should run as. Default = no value.
166	RunAsUser=www-data
167	
168	## Default gophermap #
169	# If you wish that your server would use a default gophermap when displaying
170	# a directory that do not have a gophermap, you can specify here a path to
171	# the gophermap file you'd like to use.
172	DefaultGophermap=
173	
174	## HTTP error file
175	# When Motsognir receives a HTTP request, it answers with a HTTP error, along
176	# with a html message indicating why it is wrong. If you'd like to use a
177	# custom html file, you can set it here. Note, that the specified file is
178	# loaded when Motsognir's starts. If you modify the file afterwards, you'll
179	# need to restart the Motsognir process for the file to be reloaded.
180	# Example: HttpErrFile=/etc/motsognir-httperr.html
181	HttpErrFile=
182	
183	## Caps.txt support ##
184	# Caps.txt is a specific file-like selector, which allows a gopher client to
185	# know more about the server's implementation (for example what the path's
186	# delimiter is, where is the server located, etc). When enabled, Motsognir
187	# will answer with caps-compatible data to requests for "/caps.txt".
188	# Caps support is enabled by default (CapsSupport=1).
189	CapsSupport=1
190	
191	## Caps additionnal informations ##
192	# If Caps support is enabled, you can specify there some additional
193	# informations about your server. These informations will be served to gopher
194	# clients along with the CAPS.TXT data.
195	# Example:
196	#  CapsServerArchitecture=Linux/i386
197	#  CapsServerDescription=This is my server
198	#  CapsServerGeolocationString=Dobrogoszcz, Poland
199	#  CapsServerDefaultEncoding=UTF-8
200	CapsServerArchitecture=Linux
201	CapsServerDescription=The Chateau
202	CapsServerGeolocationString=NYC, USA
203	#CapsServerDefaultEncoding=UTF-8
204	
205	## Extension to filetype mapping ##
206	# Motsognir looks at file's extensions to advertise the proper gopher resource
207	# type. If the default mapping is not suiting you, you can load a custom
208	# mapping using a separate configuration file called an 'extmap', and declare
209	# it below. The extmap file is a simple text file, where every line provides
210	# a mapping for a single file extension, in such format:
211	#  txt:0
212	#  pdf:P
213	#  gif:g
214	# Note: Extensions in the extmap file are processes in a case-insensitive way.
215	ExtMapFile=
216	
217	# [End of file here]