# mathopd.conf
# configure mathopd to run under perp supervision
# wcm, 2009.12.31 - 2009.12.31
# ===

## secure umask:
Umask 026

## unprivileged user:
User mathopd
StayRoot On


##
## tuning
##
Tuning {
  NumConnections 64
  BufSize 12288
  InputBufSize 2048
  ScriptBufSize 4096
  NumHeaders 100
  Timeout 60
  ScriptTimeout 60
}


##
## default controls:
##
## IMPORTANT:
## default Control block must precede Server block!
##
Control {
  RunScriptsAsOwner On
  ChildLog /dev/stderr
  Types {
      text/html  { .html }
      text/plain { .txt }
      image/gif  { .gif }
      image/png  { .png }
      image/jpeg { .jpg }
      text/css   { .css }
      application/octet-stream { * }
  }
  Specials {
      Dump { /dump }
      CGI { cgi }
      Imagemap { map }
      Redirect { url }
  }
  IndexNames { index.html }
}


##
## server:
##
Server {
## listen on any interface address:
#  Address 0
## change to listen on non-standard port:
#  Port 80
## define default document root:
  Virtual {
    AnyHost
    Control {
      Alias /
      Location /var/www
    }
  }
## virtual host example: thedjbway:
  Virtual {
      Host thedjbway.org
      Host www.thedjbway.org
      Control {
          Alias /
          Location /var/public/mathopd/thedjbway.org
      }
  }
}


##
## logging:
##
## direct all logging to stderr for tinylog:
Log  /dev/stderr
ErrorLog /dev/stderr
LogGMT Off
LogFormat {
  #Ctime
  Status
  ServerName
  RemoteAddress
  Method
  URI
  QueryString
  UserAgent
}


## pid file unnecessary with perp:
#PIDFile /var/run/mathopd.pid

###
