
cat > conf/monkey.conf <<EOF
# Monkey HTTP Daemon - Configuration
# ==================================
# These are the main variables and their descriptions, defined in respect
# to the configuration of the different types of directives.

[SERVER]
    # Port : 
    # ------
    # Port is the number of the door in which Monkey will be listened through
    # connections and petitions. This number can have any value between 1 and
    # 65535. If the specified number is less than or equal to 1024, only root 
    # superuser's owned process will be able to be established as a connection.

    Port 2001

    # Listen:
    # -------
    # The Listen directive restricts Monkey from listening for incoming connections 
    # other than the network interface associated to the given value. In order to 
    # allow just loopback connection you could use:
    #
    # Listen 127.0.0.1

    # Workers:
    # --------
    # Monkey launches threads to attend clients; each worker thread is capable
    # of attending more than one client request at one time. The amount of 
    # clients that can be handled by each thread is calculated using the 
    # number of file descriptors allowed by the system. This variable cannot 
    # be less than 1.

    Workers 5

    # Timeout :
    # ---------
    # The largest span of time, expressed in seconds, during which you should
    # wait to receive the information or waiting time for the remote host to
    # accept an answer. (Timeout > 0)

    Timeout 15

    # PidFile:
    # --------
    # File where the server guards the process number when starting.

    PidFile $logdir/monkey.pid

    # UserDir:
    # --------
    # Directory name for users home (/~user).

    UserDir public_html

    # Indexfile :
    # -----------
    # Number of the initial file of aperture when calling a directory.

    Indexfile index.html index.htm
    
    
    # HideVersion :
    # ------------- 
    # For security reasons, sometimes people want to hide the version of his 
    # own webserver to clients (values on/off).

    HideVersion off


    # Resume:
    # -------
    # Allow clients to request files by ranges (values on/off).

    Resume on

    # User :
    # ------
    # If you want the webserver to run as a process of a defined user, you can
    # define it in this variable. For the change of user to work, it's necessary
    # to execute Monkey with root privileges. If it's started by a user that
    # that doesn't have root privileges, this variable will be omitted.

    User nobody

    # -----------------
    #  ADVANCED CONFIG
    # -----------------
    # Just change the next variables if you know what are you doing.

    # KeepAlive :
    # -----------
    # Allow persistent connections. (on/off)

    KeepAlive on

    # MaxKeepAliveRequest
    # -------------------
    # Maximum number of requests per connection. (value > 0)

    MaxKeepAliveRequest 20

    # KeepAliveTimeout
    # ----------------
    # Number of seconds to wait for the next request in a persistent
    # connection (value > 0).

    KeepAliveTimeout 15 

    # MaxRequestSize
    # ----------------
    # When a request arrives, Monkey allocs a 'chunk' of memory space
    # to receive the incoming data. As many times the incoming data 
    # size is undeterminated, Monkey increases the buffer as required. This
    # variable defines the maximum size that the buffer can grow in terms
    # of KB. Example: defining 'MaxRequestSize 32' means 32 Kilobytes.
    # The value defined must be greater than zero. Default value defined 
    # is 32.

    MaxRequestSize 32

    # SymLink
    # -------
    # Allow request to symbolic link files.

    SymLink Off

EOF
