# $Id: httpd.conf,v 1.7 2002/06/17 11:08:16 cissoko Exp $
##
## httpd.conf -- Apache HTTP server configuration file
##

# ATTENTION , ce fichier se trouve dans /easy_conf ainsi que le RCS
# ATTENTION , ce fichier se trouve dans /easy_conf ainsi que le RCS
# ATTENTION , ce fichier se trouve dans /easy_conf ainsi que le RCS
# ATTENTION , ce fichier est commun a tous les frontaux easy biz 
# ATTENTION , ce fichier est commun a tous les frontaux easy biz 
# ATTENTION , ce fichier est commun a tous les frontaux easy biz 

ServerType standalone
ServerRoot "/usr/local"
PidFile /var/run/httpd.pid
ScoreBoardFile /var/run/httpd.scoreboard
ResourceConfig /usr/local/etc/apache/httpd-local.conf
AccessConfig /dev/null
Timeout 30
KeepAlive On
MaxKeepAliveRequests 64
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 20
StartServers 20
#MaxClients 1024
MaxClients 512
MaxRequestsPerChild 10000

ListenBacklog 4096

Listen 80 
Port 80
#Listen 8080
#Listen 3128
<IfDefine MOD_SSL>
Port 443
Listen 443
</IfDefine>

# LoadModule foo_module libexec/mod_foo.so
#LoadModule vhost_alias_module libexec/apache/mod_vhost_alias.so
LoadModule env_module         libexec/apache/mod_env.so
LoadModule config_log_module  libexec/apache/mod_log_config.so
LoadModule mime_magic_module  libexec/apache/mod_mime_magic.so
LoadModule mime_module        libexec/apache/mod_mime.so
LoadModule negotiation_module libexec/apache/mod_negotiation.so
LoadModule status_module      libexec/apache/mod_status.so
LoadModule info_module        libexec/apache/mod_info.so
LoadModule includes_module    libexec/apache/mod_include.so
LoadModule autoindex_module   libexec/apache/mod_autoindex.so
LoadModule dir_module         libexec/apache/mod_dir.so
LoadModule cgi_module         libexec/apache/mod_cgi.so
LoadModule asis_module        libexec/apache/mod_asis.so
LoadModule imap_module        libexec/apache/mod_imap.so
LoadModule action_module      libexec/apache/mod_actions.so
LoadModule speling_module     libexec/apache/mod_speling.so
LoadModule userdir_module     libexec/apache/mod_userdir.so
LoadModule alias_module       libexec/apache/mod_alias.so
LoadModule rewrite_module     libexec/apache/mod_rewrite.so
LoadModule access_module      libexec/apache/mod_access.so
LoadModule auth_module        libexec/apache/mod_auth.so
LoadModule auth_mysql_module  libexec/apache/libauth_mysql.so
LoadModule anon_auth_module   libexec/apache/mod_auth_anon.so
LoadModule db_auth_module     libexec/apache/mod_auth_db.so
LoadModule digest_module      libexec/apache/mod_digest.so
#LoadModule proxy_module       libexec/apache/libproxy.so
LoadModule cern_meta_module   libexec/apache/mod_cern_meta.so
LoadModule expires_module     libexec/apache/mod_expires.so
LoadModule headers_module     libexec/apache/mod_headers.so
LoadModule usertrack_module   libexec/apache/mod_usertrack.so
LoadModule unique_id_module   libexec/apache/mod_unique_id.so
<IfDefine MOD_FP>
  LoadModule frontpage_module   libexec/apache/mod_frontpage.so
</IfDefine>
<IfDefine MOD_SSL>
  LoadModule ssl_module   libexec/apache/libssl.so
</IfDefine>
<ifDefine MOD_EV>
  LoadModule dosevasive_module  libexec/apache/mod_dosevasive.so
  #LoadModule evasive_module     libexec/apache/mod_evasive.so
</ifDefine>
LoadModule setenvif_module    libexec/apache/mod_setenvif.so
LoadModule auth_text_module   libexec/apache/mod_auth_text.so

#  [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO]
ClearModuleList
#AddModule mod_vhost_alias.c
AddModule mod_env.c
AddModule mod_log_config.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_mysql.c
AddModule mod_auth_anon.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_unique_id.c
AddModule mod_so.c
<IfDefine MOD_FP>
AddModule mod_frontpage.c
</IfDefine>
<IfDefine MOD_SSL>
AddModule mod_ssl.c
</IfDefine>
<ifDefine MOD_EV>
 #AddModule mod_evasive.c
 AddModule mod_dosevasive.c
</ifDefine>
AddModule mod_setenvif.c
AddModule mod_auth_text.c

<IfModule mod_dosevasive.c>
    DOSHashTableSize    3097
    DOSPageCount        2
    DOSSiteCount        50
    DOSPageInterval     1
    DOSSiteInterval     1
    DOSBlockingPeriod   10
    DOSEmailNotify      sri@fr.clara.net
    DOSLogDir           "/var/log/mod_evasive"
    #DOSSystemCommand    "su - someuser -c '/sbin/... %s ...'"
</IfModule>




ExtendedStatus On

User claranet
Group claranet

ServerAdmin webmaster@claranet.fr
DocumentRoot /usr/local/www/data

<Directory />
    Options Indexes
    AllowOverride AuthConfig FileInfo Indexes Limit
</Directory>

<Directory /usr/local/www/data>
    Options All
    AllowOverride AuthConfig FileInfo Indexes Limit Options
</Directory>

<Directory /data/web>
 	AllowOverride AuthConfig Limit Indexes FileInfo  
	Options ExecCGI Includes IncludesNoExec SymLinksIfOwnerMatch
</Directory>

DirectoryIndex index.html index.htm index.php index.shtml index.php3 index.phtml index.pl index.cgi index.wml index.phpa index.phpb
AccessFileName .htaccess

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

UseCanonicalName Off
#
# TypesConfig describes where the mime.types file (or equivalent) is
# to be found.
#
TypesConfig /usr/local/etc/apache/mime.types
#TypesConfig /easy_conf/mime.types
DefaultType text/plain
<IfModule mod_mime_magic.c>
    MIMEMagicFile /usr/local/etc/apache/magic
    #MIMEMagicFile /easy_conf/magic
</IfModule>

HostnameLookups Off
#
ErrorLog /mydata/var/log/httpd/httpd-error.log
# Possible values include: debug, info, notice, warn, error, crit, ...
LogLevel warn
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).

#LogFormat "%{USER}e %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%V %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 /easy_logs/httpd/httpd-access.log combined
CustomLog "|exec /usr/local/sbin/cronolog /mydata/var/log/httpd/%Y/%m/%d/httpd-access.log" combined
#> CustomLog /mydata/var/log/httpd/httpd-access.log combined
LockFile /var/run/httpd.lock
#
# Optionally add a line containing the server version and virtual host
# name to server-generated pages (error documents, FTP directory listings,
# mod_status and mod_info output etc., but not CGI generated documents).
# Set to "EMail" to also include a mailto: link to the ServerAdmin.
# Set to one of:  On | Off | EMail
#
ServerSignature On
# Yann 2005.04.20 : Ajout ServerTokens ProductOnly
ServerTokens ProductOnly
#
Alias /clara-icons/ "/usr/local/www/clara-icons/"
#
<Directory "/usr/local/www/clara-icons">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
#
ScriptAlias /common-cgi/ "/usr/local/www/common-cgi/"
#
<Directory "/usr/local/www/common-cgi">
    AllowOverride AuthConfig FileInfo
    Options ExecCGI
    Order allow,deny
    Allow from all
</Directory>
#
# FancyIndexing is whether you want fancy directory indexing or standard
#
IndexOptions FancyIndexing
#
# AddIcon* directives tell the server which icon to show for different
# files or filename extensions.  These are only displayed for
# FancyIndexed directories.
#
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
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 is which icon to show for files which do not have an icon
# explicitly set.
#
DefaultIcon /icons/unknown.gif
#
# AddDescription allows you to place a short description after a file in
# server-generated indexes.  These are only displayed for FancyIndexed
# directories.
# Format: AddDescription "description" filename
#
#AddDescription "GZIP compressed document" .gz
#AddDescription "tar archive" .tar
#AddDescription "GZIP compressed tar archive" .tgz
#
# ReadmeName is the name of the README file the server will look for by
# default, and append to directory listings.
#
# HeaderName is the name of a file which should be prepended to
# directory indexes. 
#
# The server will first look for name.html and include it if found.
# If name.html doesn't exist, the server will then look for name.txt
# and include it as plaintext if found.
#
ReadmeName README
HeaderName HEADER
#
# IndexIgnore is a set of filenames which directory indexing should ignore
# and not include in the listing.  Shell-style wildcarding is permitted.
#
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
#
# AddEncoding allows you to have certain browsers (Mosaic/X 2.1+) uncompress
# information on the fly. Note: Not all browsers support this.
# Despite the name similarity, the following Add* directives have nothing
# to do with the FancyIndexing customization directives above.
#
AddEncoding x-compress Z
AddEncoding x-gzip gz tgz
#
# AddLanguage allows you to specify the language of a document. You can
# then use content negotiation to give a browser a file in a language
# it can understand.  Note that the suffix does not have to be the same
# as the language keyword --- those with documents in Polish (whose
# net-standard language code is pl) may wish to use "AddLanguage pl .po" 
# to avoid the ambiguity with the common suffix for perl scripts.
#
AddLanguage en .en
AddLanguage fr .fr
AddLanguage de .de
AddLanguage da .da
AddLanguage el .el
AddLanguage it .it
#
# LanguagePriority allows you to give precedence to some languages
# in case of a tie during content negotiation.
# Just list the languages in decreasing order of preference.
#
LanguagePriority fr en de
#
# AddType allows you to tweak mime.types without actually editing it, or to
# make certain files to be certain types.
#
# For example, the PHP3 module (not part of the Apache distribution - see
# http://www.php.net) will typically use:
#
#AddType application/x-httpd-php3 .php3
#AddType application/x-httpd-php3-source .phps

AddType application/x-tar .tgz

AddType application/x-guestbook .gb
Action application/x-guestbook /common-cgi/guestbook

AddType application/x-formail .mail
Action application/x-formail /common-cgi/formail

AddType application/x-php .php .phtml .php3 .phpa
Action application/x-php /common-cgi/php_wrapper_a

AddType application/x-php-b .phpb	
Action application/x-php-b /common-cgi/php_wrapper_b

AddType application/x-perl .pl
Action application/x-perl /common-cgi/perl_wrapper

AddType application/x-cgi .cgi
Action application/x-cgi /common-cgi/cgi_wrapper
##### HERE WE ARE ########
#
# AddHandler allows you to map certain file extensions to "handlers",
# actions unrelated to filetype. These can be either built into the server
# or added with the Action command (see below)
#
# If you want to use server side includes, or CGI outside
# ScriptAliased directories, uncomment the following lines.
#
# To use CGI scripts:
#
#AddHandler cgi-script .cgi

#
# To use server-parsed HTML files
#
AddType text/html .shtml
AddHandler server-parsed .shtml

#
# Uncomment the following line to enable Apache's send-asis HTTP file
# feature
#
#AddHandler send-as-is asis

#
# If you wish to use server-parsed imagemap files, use
#
AddHandler imap-file map

#
# To enable type maps, you might want to use
#
#AddHandler type-map var

#
# Action lets you define media types that will execute a script whenever
# a matching file is called. This eliminates the need for repeated URL
# pathnames for oft-used CGI file processors.
# Format: Action media/type /cgi-script/location
# Format: Action handler-name /cgi-script/location
#

#
# MetaDir: specifies the name of the directory in which Apache can find
# meta information files. These files contain additional HTTP headers
# to include when sending the document
#
#MetaDir .web

#
# MetaSuffix: specifies the file name suffix for the file containing the
# meta information.
#
#MetaSuffix .meta

#
# Customizable error response (Apache style)
#  these come in three flavors
#
#    1) plain text
#ErrorDocument 500 "The server made a boo boo.
#  n.b.  the (") marks it as text, it does not get output
#
#    2) local redirects
#ErrorDocument 404 /missing.html
#  to redirect to local URL /missing.html
#ErrorDocument 404 /cgi-bin/missing_handler.pl
#  N.B.: You can redirect to a script or a document using server-side-includes.
#
#    3) external redirects
#ErrorDocument 402 http://some.other_server.com/subscription_info.html
#  N.B.: Many of the environment variables associated with the original
#  request will *not* be available to such a script.

#
# The following directives modify normal HTTP response behavior.
# The first directive disables keepalive for Netscape 2.x and browsers that
# spoof it. There are known problems with these browser implementations.
# The second directive is for Microsoft Internet Explorer 4.0b2
# which has a broken HTTP/1.1 implementation and does not properly
# support keepalive when it is used on 301 or 302 (redirect) responses.
#
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0

#
# The following directive disables HTTP/1.1 responses to browsers which
# are in violation of the HTTP/1.0 spec by not being able to grok a
# basic 1.1 response.
#
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
#
# Allow server status reports, with the URL of http://servername/server-status
# Change the ".your_domain.com" to match your domain to enable.
#
<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from 212.43.194.
    Allow from 212.43.195.
</Location>
#
#
# There have been reports of people trying to abuse an old bug from pre-1.1
# days.  This bug involved a CGI script distributed as a part of Apache.
# By uncommenting these lines you can redirect these attacks to a logging 
# script on phf.apache.org.  Or, you can record them yourself, using the script
# support/phf_abuse_log.cgi.
#
#NameVirtualHost 12.34.56.78

RLimitCPU	600
RLimitMEM 	16000000
RLimitNPROC 	256

<VirtualHost  _default_:8080>
    ServerAdmin webmaster@fr.clara.net
    DocumentRoot /var/www/
    #> ErrorLog /mydata/var/log/httpd/httpd-error.log
    #> CustomLog /mydata/var/log/httpd/httpd-access.log combined
    CustomLog "|exec /usr/local/sbin/cronolog /mydata/var/log/httpd/%Y/%m/%d/httpd-access.log" combined
    ErrorLog  "|exec /usr/local/sbin/cronolog /mydata/var/log/httpd/%Y/%m/%d/httpd-error.log"
    ServerName poitou.fr.clara.net
</VirtualHost>

#<VirtualHost  _default_:3128>
#    ServerAdmin webmaster@fr.clara.net
#    DocumentRoot /usr/local/www/data/
#    #> CustomLog /mydata/var/log/httpd/httpd-access.log combined
#    #> ErrorLog  /mydata/var/log/httpd/httpd-error.log
#    CustomLog "|exec /usr/local/sbin/cronolog /mydata/var/log/httpd/%Y/%m/%d/httpd-access.log" combined
#    ErrorLog  "|exec /usr/local/sbin/cronolog /mydata/var/log/httpd/%Y/%m/%d/httpd-error.log"
#    ServerName poitou.fr.clara.net
#
#     #RewriteCond ${lowercase:%{SERVER_NAME}} ^([^.]*)\.(.*)$   [NC]
#     #RewriteRule (.*)           /data/web/X%3/X%4/X%5/%2/%1$1	[E=USER:%2,E=HOME:/data/web/X%3/X%4/X%5/%2,E=SITE:/data/web/X%3/X%4/X%5/%2/public/%1,P]
#	RewriteCond %{HTTP_HOST} ^([^.]*)\.(.*)$   [NC]
#	RewriteRule ^/(.*)  http://%{HTTP_HOST}/$1 [E=USER:%2,P]
#
#	ProxyRequests Off
#	
#	<Directory proxy:*>
#	        Order deny,allow
#		#Allow from all
#	</Directory>
#		
#	CacheRoot /mydata/proxy
#	CacheSize 102400
#	CacheDirLevels 3
#	CacheGcInterval 0.15
#	CacheMaxExpire 1
#	CacheLastModifiedFactor 0.1
#	CacheDefaultExpire 1
#</VirtualHost>


<VirtualHost _default_:80>
    ServerAdmin webmaster@poitou.fr.clara.net
    Auth_MySQL_Info sarthe.fr.clara.net easy password
    #> CustomLog /mydata/var/log/httpd/httpd-access.log combined
    #> ErrorLog /mydata/var/log/httpd/httpd-error.log
    CustomLog "|exec /usr/local/sbin/cronolog /mydata/var/log/httpd/%Y/%m/%d/httpd-access.log" combined
    ErrorLog  "|exec /usr/local/sbin/cronolog /mydata/var/log/httpd/%Y/%m/%d/httpd-error.log"

    RewriteEngine on
    RewriteMap   lowercase  int:tolower
    RewriteMap   redirect   dbm:/usr/local/etc/apache/redirect
    RewriteMap   jailconf   txt:/usr/local/etc/apache/jailconf

# SHARED SSL
    RewriteCond ${lowercase:%{SERVER_NAME}} ^monssl\.com$   [NC]
    RewriteRule ^/([^/]*)(.*)   http://$1$2 [L]
# SHARED SSL

    RewriteCond ${lowercase:%{SERVER_NAME}} ^([^.]*)\.((.)(.)(.).*)$   [NC]
    RewriteRule /common-cgi(.*)     /usr/local/www/common-cgi$1 [T=application/x-httpd-cgi,E=USER:%2,E=HOME:/data/web/X%3/X%4/X%5/%2,E=JAILIP:${jailconf:jailip},E=JAILNAME:${jailconf:jailname},L]
    RewriteRule /clara-icons(.*)    /usr/local/www/clara-icons$1 [L]
    RewriteCond ${lowercase:%{SERVER_NAME}} ^([^.]*)\.((.)(.)(.).*)$   [NC]
    RewriteRule /adminpass$         http://%1.%2/adminpass/ [L]

    RewriteCond ${lowercase:%{SERVER_NAME}} ^([^.]*)\.((.)(.)(.).*)$   [NC]
    RewriteRule /adminpass(.*)      /usr/local/www/adminpass/php$1 [T=application/x-php,E=USER:%2,E=HOME:/data/web/X%3/X%4/X%5/%2,L]
    RewriteRule /common-php(.*)     /usr/local/www/common-php$1 [T=application/x-php,E=USER:%2,L]
    RewriteRule /common-images(.*)  /usr/local/www/common-data/forum/images$1 [L]
    RewriteRule /common-htdig(.*)   /usr/local/www/common-data/htdig$1 [L]


     RewriteCond %{REMOTE_ADDR}              !^212\.43\.241\.
     RewriteCond ${redirect:%{SERVER_NAME}}  \!(.+)                 [NC]
     RewriteRule (.*) 			     %1                     [R,L]

     RewriteCond %{REMOTE_ADDR}              !^212\.43\.241\.
     RewriteCond ${redirect:%{SERVER_NAME}}  (.+)                   [NC]
     RewriteRule (.*) 			     %1$1                   [R,L]


     RewriteCond ${lowercase:%{SERVER_NAME}} ^([^.]*)\.((.)(.)(.).*)$   [NC]
     RewriteRule (.*)           /data/web/X%3/X%4/X%5/%2/public/%1$1	[E=PI:%{SCRIPT_FILENAME},E=USER:%2,E=HOME:/data/web/X%3/X%4/X%5/%2,E=SITE:/data/web/X%3/X%4/X%5/%2/public/%1,L]

</VirtualHost>

<IfDefine MOD_SSL>
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl    .crl
#   Pass Phrase Dialog:
#   Configure the pass phrase gathering process.
#   The filtering dialog program (`builtin' is a internal
#   terminal dialog) has to provide the pass phrase on stdout.
#SSLPassPhraseDialog  builtin
SSLPassPhraseDialog  exec:/usr/local/libexec/apache/ssldialog
#
#   Inter-Process Session Cache:
#   Configure the SSL Session Cache: First either `none'
#   or `dbm:/path/to/file' for the mechanism to use and
#   second the expiring timeout (in seconds).
#SSLSessionCache        none
#SSLSessionCache        shm:/var/run/apache_ssl_scache(512000)
SSLSessionCache         dbm:/var/run/apache_ssl_scache
SSLSessionCacheTimeout  300
#
#   Semaphore:
#   Configure the path to the mutual explusion semaphore the
#   SSL engine uses internally for inter-process synchronization.
SSLMutex  file:/var/run/apache_ssl_mutex
#
#   Pseudo Random Number Generator (PRNG):
#   Configure one or more sources to seed the PRNG of the
#   SSL library. The seed data should be of good random quality.
#   WARNING! On some platforms /dev/random blocks if not enough entropy
#   is available. This means you then cannot use the /dev/random device
#   because it would lead to very long connection times (as long as
#   it requires to make more entropy available). But usually those
#   platforms additionally provide a /dev/urandom device which doesn't
#   block. So, if available, use this one instead. Read the mod_ssl User
#   Manual for more details.
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
#SSLRandomSeed startup file:/dev/random  512
#SSLRandomSeed startup file:/dev/urandom 512
#SSLRandomSeed connect file:/dev/random  512
#SSLRandomSeed connect file:/dev/urandom 512
#
#   Logging:
#   The home of the dedicated SSL protocol logfile. Errors are
#   additionally duplicated in the general error log file.  Put
#   this somewhere where it cannot be used for symlink attacks on
#   a real server (i.e. somewhere where only root can write).
#   Log levels are (ascending order: higher ones include lower ones):
#   none, error, warn, info, trace, debug.
SSLLog      /var/log/httpd/apache_ssl_engine_log
SSLLogLevel none

</IfDefine>

<IfDefine MOD_SSL>
  <VirtualHost _default_:443>
  ServerName monssl.com

  SSLEngine on
#  SSLPassPhraseDialog  exec:/usr/local/libexec/apache/ssldialog
  SSLCipherSuite ALL:!ADH:!EXP56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
  SSLCertificateKeyFile /usr/local/etc/apache/ssl.key/server.key
  SSLCertificateFile /usr/local/etc/apache/ssl.crt/thawte.crt
  <Files ~ "\.(cgi|shtml|phtml|php3?)$">
    SSLOptions +StdEnvVars
  </Files>
  <Directory "/usr/local/share/apache/cgi-bin">
    SSLOptions +StdEnvVars
  </Directory>

  SetEnvIf User-Agent ".*MSIE.*" \
         nokeepalive ssl-unclean-shutdown \
         downgrade-1.0 force-response-1.0

  CustomLog /var/log/httpd/apache_ssl_request_log \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

  ServerAdmin webmaster@claranet.fr
  Auth_MySQL_Info sarthe.fr.clara.net easy password

  RewriteEngine on
  RewriteMap   lowercase  int:tolower
  RewriteMap   redirect   dbm:/usr/local/etc/apache/redirect
  RewriteMap   jailconf   txt:/usr/local/etc/apache/jailconf
  RewriteMap   sharedssl  txt:/usr/local/etc/apache/sharedssl

  RewriteCond ${redirect:%{SERVER_NAME}}  (.+)       [NC]
  RewriteRule (.*)                        %1$1   [R,L]

  RewriteLogLevel 0
  RewriteLog /var/log/httpd/ssl-rewrite.log

  RewriteCond ${lowercase:%{SERVER_NAME}} ^monssl\.com$   [NC]
  RewriteRule /common-cgi(.*)     /usr/local/www/common-cgi$1 [T=application/x-httpd-cgi,E=HOME:/data/web/X%3/X%4/X%5/%2,E=JAILIP:${jailconf:jailip},E=JAILNAME:${jailconf:jailname},L]
  RewriteRule ^/[^/]*/clara-icons(.*)    /usr/local/www/clara-icons$1 [L]
  RewriteRule ^/([^.]*)\.((.)(.)(.)[^/]*)/adminpass$      https://monssl.com/$1.$2/adminpass/ [R]
  RewriteRule ^/([^.]*)\.((.)(.)(.)[^/]*)/adminpass(.*)   /usr/local/www/adminpass/php$6 [T=application/x-php,E=USER:$2,E=HOME:/data/web/X$3/X$4/X$5/$2,L]
  RewriteRule ^/[^/]*/common-php(.*)     /usr/local/www/common-php$1 [T=application/x-php,L]
  RewriteRule ^/[^/]*/common-images(.*)  /usr/local/www/common-data/forum/images$1 [L]
  RewriteRule ^/[^/]*/common-htdig(.*)   /usr/local/www/common-data/htdig$1 [L]

  RewriteCond ${lowercase:%{SERVER_NAME}} ^monssl\.com$   [NC]
#  RewriteRule ^/([^.]*)\.((.)(.)(.)[^/]*)(.*)   /data/web/X$3/X$4/X$5/$2/secure/$1.$2/$6 [E=USER:$2,E=HOME:/data/web/X$3/X$4/X$5/$2,E=SITE:/data/web/X$3/X$4/X$5/$2/secure/$1.$2,L]
  RewriteRule ^/([^.]*)\.((.)(.)(.)[^/]*)(.*)   /data/web/X$3/X$4/X$5/${sharedssl:$2}/public/$1/$6 [E=USER:$2,E=HOME:/data/web/X$3/X$4/X$5/$2,E=SITE:/data/web/X$3/X$4/X$5/$2/public/$1,L]

# tom, 28/07/04 404 error added...
# ErrorDocument 404 "Page not Found.

  </VirtualHost>
</IfDefine>

