gopher.conf 10 KB

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