Sample file with configuration

# location of the web server files
ServerRoot /usr/local/apache
# location of the web server tree
DocumentRoot /var/www/htdocs
# path to the process ID (PID) file, which
# stores the PID of the main Apache process
PidFile /var/www/logs/httpd.pid
# which port to listen at
Listen 80
# do not resolve client IP addresses to names
HostNameLookups Off

<Directory />
    Order Deny,Allow
    Deny from all

    Options None
    AllowOverride None
</Directory>
<Directory /var/www/htdocs>
    Order Allow,Deny
    Allow from all
</Directory>

<Directory /var/www/cgi-bin>
    Options ExecCGI
    SetHandler cgi-script
</Directory>

# alternative
# ScriptAlias /cgi-bin/ /var/www/cgi-bin/

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog /var/www/logs/access_log combined
LogLevel info
ErrorLog /var/www/logs/error_log


# wait up to 300 seconds for slow clients, can be down up to 60s when DOS attack
TimeOut 300

# allow connections to be reused between requests
KeepAlive On

# allow a maximum of 100 requests per connection
MaxKeepAliveRequests 100

# wait up to 15 seconds for the next
# request on an open connection
KeepAliveTimeout 15


# impose no limits on the request body
LimitRequestBody 0

# allow up to 100 headers in a request
LimitRequestFields 100

# each header may be up to 8190 bytes long
LimitRequestFieldsize 8190

# the first line of the request can be
# up to 8190 bytes long
LimitRequestLine 8190

# limit the XML request body to 1 million bytes(Apache 2.x only)
LimitXMLRequestBody 1000000


# keep 5 servers ready to handle requests
MinSpareServers 5

# do not keep more than 10 servers idle
MaxSpareServers 10

# start with 5 servers
StartServers 5

# allow a max of 150 clients at any given time
MaxClients 150

# allow unlimited requests per server
MaxRequestsPerChild 0


ServerSignature Off
ServerTokens Prod

<FilesMatch "(^\.ht|~$|\.bak$|\.BAK$)">
    Order Allow,Deny
    Deny from all
</FilesMatch>

<DirectoryMatch /CVS/>
    Order Allow,Deny
    Deny from all
</DirectoryMatch>

<DirectoryMatch /.svn/>
    Order Allow,Deny
    Deny from all
</DirectoryMatch>