Umask 026 Tuning { NumConnections 64 BufSize 12288 InputBufSize 2048 ScriptBufSize 4096 NumHeaders 100 Timeout 60 ScriptTimeout 60 } User http StayRoot On PIDFile /var/run/mathopd.pid Log /var/log/mathopd/mathopd.log ErrorLog /var/log/mathopd/error.log LogFormat { Ctime RemoteUser RemoteAddress RemotePort ServerName Method URI QueryString Version Status ContentLength BytesRead BytesWritten } LogGMT On Control { RunScriptsAsOwner Off ScriptUser nobody ChildLog /var/log/mathopd/childlog Types { text/html { html } text/plain { txt } image/gif { gif } image/jpeg { jpg } text/css { css } application/octet-stream { * } } Specials { Dump { /dump } CGI { cgi } Imagemap { map } Redirect { url } } External { /usr/bin/php { php } } IndexNames { index.html } AutoIndexCommand /usr/sbin/mathopd-dir_cgi } Server { Virtual { AnyHost # # A control block that has both an alias and a location keyword defines what # is generally known as a 'virtual directory'. When mathopd converts URLs # to pathnames it scans these blocks until it matches the URL with what is # defined as the alias. Scanning stops as soon as a match is found (!) # A location with alias "/" is the virtual root. This alias always matches. # You must put the root before any other aliases in this file, otherwise # it will simply obscure the remaining aliases. # # The '*' in the location is expanded to the name of the Host header # that is submitted by the client. # Control { Alias / Location /home/boland/* } # # Here is an example of an old-fashioned 'cgi-bin' directory. # Control { Alias /cgi-bin Location /home/boland/cgi-bin Specials { CGI { * } } } # # User directories work by substituting a login with the home directory # for that login, followed by whatever is defined as the location # so for example /~boland/ would be translated into /home/boland/public_html/ # (assuming that /home/boland is the home directory for user boland.) # # Note that if a user is not in the password file, mathopd will skip this # alias and try to match the URL with any remaining aliases. E.g. if 'cmj' # is a nonexisting user then /~cmj/ would translate into /home/boland/www/~cmj/ # # Password file lookups can be very slow! Use this feature at your own risk. # Control { Alias /~ Location public_html UserDirectory On } # # If you have users for whom you do not want to enable user directories # you can create an alias like the one below. Note that you must put # these underneath the alias that has the userdirectory keyword because # mathopd matches aliases from the bottom of the configuration upwards. # Control { Alias /~root Location /nosuchdirectory } Control { Alias /doc Location /usr/share/doc/handbook } # # Example of a redirect # Control { Alias /secure Location https://an.example } } }