ServerType standalone
ServerRoot "/var/apache"
LockFile /var/lock/httpd.accept.lock
PidFile /var/run/httpd.pid
ScoreBoardFile /var/log/httpd/apache_runtime_status

#don't get more information as needed
ServerTokens Prod

TimeOut 300
KeepAlive on
MaxKeepAliveRequests 100
KeepAliveTimeout 15

MinSpareServers 1
MaxSpareServers 5
StartServers 1
MaxClients 10
MaxRequestsPerChild 0

ClearModuleList
AddModule mod_mmap_static.c
AddModule mod_vhost_alias.c
AddModule mod_env.c
AddModule mod_define.c
AddModule mod_log_config.c
AddModule mod_log_agent.c
AddModule mod_log_referer.c
AddModule mod_mime_magic.c
AddModule mod_mime.c
AddModule mod_negotiation.c
AddModule mod_status.c
AddModule mod_info.c
AddModule mod_include.c
AddModule mod_autoindex.c
AddModule mod_dir.c
AddModule mod_cgi.c
AddModule mod_asis.c
AddModule mod_imap.c
AddModule mod_actions.c
AddModule mod_speling.c
AddModule mod_userdir.c
AddModule mod_alias.c
AddModule mod_rewrite.c
AddModule mod_access.c
AddModule mod_auth.c
AddModule mod_auth_anon.c
#AddModule mod_auth_dbm.c
#AddModule mod_auth_db.c
AddModule mod_digest.c
AddModule mod_proxy.c
AddModule mod_cern_meta.c
AddModule mod_expires.c
AddModule mod_headers.c
AddModule mod_usertrack.c
AddModule mod_example.c
AddModule mod_unique_id.c
AddModule mod_so.c
AddModule mod_setenvif.c

<IfDefine SSL>
  AddModule mod_ssl.c
</IfDefine>
<IfDefine PERL>
  AddModule  mod_perl.c
</IfDefine>
<IfDefine PHP4>
  AddModule  mod_php4.c
</IfDefine>
<IfDefine DAV>
  AddModule  mod_dav.c
</IfDefine>

Listen 192.168.0.1:8080
<IfDefine SSL>
Listen 192.168.0.1:8443
</IfDefine>

User  wwwrun
Group nogroup

ServerAdmin webmaster@laas.priv

ServerName www.laas.priv
UserDir www
DocumentRoot "/var/apache/htdocs"
DirectoryIndex index.html index.htm index.php
AccessFileName .htaccess
ExtendedStatus On

<Files ~ "^\.ht">
  Order allow,deny
  Deny from all
</Files>

<Directory />
  Order deny,allow
  Deny from all
  Allow from 127.0.0.1 192.168.0.1 192.168.0.2 192.168.0.3 192.168.0.5
  AllowOverride FileInfo
</Directory>

<Location /server-status>
  SetHandler server-status
  Order deny,allow
  Deny from all
  Allow from 127.0.0.1 192.168.0.1 192.168.0.2 192.168.0.3 192.168.0.5
</Location>

<Location /server-info>
  SetHandler server-info
  Order deny,allow
  Deny from all
  Allow from 127.0.0.1 192.168.0.1 192.168.0.2 192.168.0.3 192.168.0.5
</Location>

<IfDefine PERL>
  <Location /perl-status>
    SetHandler  perl-script
    PerlHandler Apache::Status
    order deny,allow
    deny from all
    allow from 127.0.0.1 192.168.0.1 192.168.0.2 192.168.0.3 192.168.0.5
  </Location>
</IfDefine>

<Directory /var/apache/htdocs>
  Order deny,allow
  Deny from all
  Allow from 127.0.0.1 192.168.0.1 192.168.0.2 192.168.0.3 192.168.0.5
  Options +FollowSymLinks +Includes +ExecCGI
  AllowOverride AuthConfig
</Directory>

<Directory /var/apache/htdocs/cgi-bin>
  Order deny,allow
  Deny from all
  Allow from 127.0.0.1 192.168.0.1 192.168.0.2 192.168.0.3 192.168.0.5
  Options +FollowSymLinks +Includes +ExecCGI -Indexes
  AllowOverride AuthConfig
  <IfDefine PERL>
    AddHandler  perl-script .pl
    PerlHandler Apache::Registry
    PerlSendHeader On
  </IfDefine>
</Directory>

<Directory /var/apache/cgi-bin>
  Order deny,allow
  Deny from all
  Allow from 127.0.0.1 192.168.0.1 192.168.0.2 192.168.0.3 192.168.0.5
  Options +FollowSymLinks +Includes +ExecCGI -Indexes
  AllowOverride AuthConfig
  <IfDefine PERL>
    AddHandler  perl-script .pl
    PerlHandler Apache::Registry
    PerlSendHeader On
  </IfDefine>
</Directory>

<Directory /home/*/www>
  Order deny,allow
  Deny from all
  Allow from 127.0.0.1 192.168.0.1 192.168.0.2 192.168.0.3 192.168.0.5
  Options -Indexes +Includes +ExecCGI
  AllowOverride none
</Directory>

<Directory /usr/local/netsaint/sbin>
  AllowOverride AuthConfig
  Order allow,deny
  Allow from 127.0.0.1 192.168.0.1 192.168.0.2 192.168.0.3 192.168.0.5
  Options +ExecCGI +Includes
  SetHandler cgi-script
</Directory>

<Location cgi-bin>
  Options -Indexes +ExecCGI
  Order deny,allow
  Deny from all
  Allow from 127.0.0.1 192.168.0.1 192.168.0.2 192.168.0.3 192.168.0.5
  SetHandler cgi-script
  <IfDefine PERL>
    AddHandler  perl-script .pl
    PerlHandler Apache::Registry
    PerlSendHeader On
  </IfDefine>
</Location>

CacheNegotiatedDocs
UseCanonicalName On
HostnameLookups Off
TypesConfig /etc/httpd/mime.types
DefaultType text/plain
<IfModule mod_mime_magic.c>
  MIMEMagicFile /etc/httpd/magic
</IfModule>

#code red and nimba worm goes direct to m$ ^^
<IfModule mod_alias.c>
  RedirectMatch (.*)\default.ida$ http://www.microsoft.com
  RedirectMatch (.*)\root.exe$    http://www.microsoft.com
  RedirectMatch (.*)\cmd.exe$     http://www.microsoft.com
  RedirectMatch (.*)\msadc$       http://www.microsoft.com
</IfModule>

#ignore code red and nimba requests
SetEnvIf Request_URI \cmd.exe|\root.exe|\default.ida worms

ErrorLog /var/log/httpd/error_log
LogLevel warn

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

Customlog /var/log/httpd/access_log common env=!worms

# Set to one of:  On | Off | EMail
ServerSignature EMail

Alias /icons/ "/var/apache/icons/"
Alias /images/ "/var/apache/images/"
ScriptAlias /cgi-bin/ "/var/apache/cgi-bin/"

#NetSaint
Alias /netsaint/ "/usr/local/netsaint/share/"
ScriptAlias /cgi-bin/netsaint/ /usr/local/netsaint/sbin/

# FancyIndexing is whether you want fancy directory indexing or standard
IndexOptions FancyIndexing

AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip

AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*

AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl .cgi
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core

AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^

DefaultIcon /icons/unknown.gif

AddDescription "GZIP compressed document" .gz
AddDescription "tar archive" .tar
AddDescription "GZIP compressed tar archive" .tgz

ReadmeName README
HeaderName HEADER

IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
AddEncoding x-compress Z
AddEncoding x-gzip gz tgz

AddLanguage en .en
AddLanguage de .de

LanguagePriority de en

#activate php4 parsing
<IfDefine PHP4>
  AddType application/x-httpd-php .php
  AddType application/x-httpd-php .php3
  AddType application/x-httpd-php-source .phps
</IfDefine>

AddType application/x-tar .tgz
AddType application/x-tar .tar.gz
AddType text/html .shtml
AddHandler cgi-script .cgi
AddHandler server-parsed .shtml
AddHandler server-parsed .html
#<IfDefine PERL>
#AddHandler perl-script .pl
#</IfDefine>

BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0

### Section 3: Virtual Hosts
NameVirtualHost 192.168.0.1:8080
<IfDefine SSL>
  NameVirtualHost 192.168.0.1:8443
</IfDefine>

<VirtualHost 192.168.0.1:8080>
  DocumentRoot "/var/apache/htdocs"
  ServerName www.laas.priv
  ServerAdmin webmaster@laas.priv
  <IfDefine SSL>
   SSLEngine off
  </IfDefine>
</VirtualHost>

#<VirtualHost _default_:*>
#</VirtualHost>

#Some MIME-types for downloading Certificates and CRLs
<IfDefine SSL>
  AddType application/x-x509-ca-cert .crt
  AddType application/x-pkcs7-crl    .crl
</IfDefine>

<IfModule mod_ssl.c>
  SSLPassPhraseDialog  builtin
  SSLSessionCache         dbm:/var/log/ssl_scache
  SSLSessionCacheTimeout  300
  SSLMutex  file:/var/log/ssl_mutex
  SSLRandomSeed startup builtin
  SSLRandomSeed connect builtin
  SSLLog      /var/log/ssl_engine_log
  SSLLogLevel error
</IfModule>

<IfDefine SSL>
  <VirtualHost 192.168.0.1:8443>
    DocumentRoot "/var/apache/htdocs"
    ServerName www.laas.priv
    ServerAdmin webmaster@laas.priv
    SSLEngine on
    SSLCertificateFile /etc/httpd/ssl.crt/server.crt
    SSLCertificateKeyFile /etc/httpd/ssl.key/server.key
    SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
    CustomLog /var/log/ssl_request_log \
      "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
  </VirtualHost>
</IfDefine>
