You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gophi/docs/example.toml

119 lines
2.4 KiB
TOML

# NOTE: due to how TOML is parsed, you will
# need to escape forward slashes in regex
# statements and anywhere else you may
# need them
# Server root directory
root = "/var/gophi"
# Server bind address
listen = "127.0.0.1"
# Server hostname
hostname = "localhost"
# Port to listen on
port = 1024
# Enable user server spaces, e.g.
# ~/public_{gopher,gemini}
user-spaces = false
[connection]
# Connection read timeout
read-timeout = "5s"
# Connection write timeout
write-timeout = "15s"
# Connection read buffer size (in bytes)
read-buf = 1024
# Connection write buffer size (in bytes)
write-buf = 1024
# Connection read max (in bytes)
read-max = 4096
[filesystem]
# File read buffer size (in bytes)
read-buf = 1024
[filesystem.cache]
# Filesystem monitor check freq.
monitor-freq = "60s"
# Maximum cached file size (in MB)
file-max = 1.0
# Maximum file age before mark
# as stale, i.e. safe to be
# removed on next monitor sweep
age-max = "5m"
# Cache size count
size = 100
[requests]
# String array of filesystem path
# regex statements to restrict.
restrict = [
"(.+/)?\\.\\w",
]
# String array of filesystem path
# regex statements to hide from dir
# listings
hidden = [
"",
]
# String array of request remapping
# regex statements
remap = [
"",
]
[log]
# Log output locations, options:
# - stdout -> /dev/stdout
# - stderr -> /dev/stderr
# - null -> /dev/null
# - $file -> $file
system = "stdout"
access = "stdout"
[cgi]
# Relative CGI scripts directory
# path within server root
directory = "cgi-bin"
# CGI environment $PATH
safe-path = "/bin:/usr/bin"
# Maximum CGI script runtime
max-time = "3s"
# Gopher specific configuration, uncomment
# if you have built gophi as a gopher server
#[gopher]
# # Page width before line truncation
# page-width = 80
#
# # Footer text included below gophermaps
# footer = ""
#
# # Subgophermap size max (in megabytes)
# subgopher-max = 1.0
#
# # Information included in caps.txt
# # policy file
# admin-email = ""
# description = ""
# geolocation = ""
# Gemini specific configuration, uncomment
# if you have built gophi as a gemini server
#[gemini]
# tls-cert = ""
# tls-key = ""