
#
# Configuration Apache pour www.claranet.fr
#

### Section 1: Global Environment

ServerType		standalone
ServerRoot		"/usr/lib/apache"
PidFile			/local-data/http-logs/httpd.pid
ScoreBoardFile		/local-data/http-logs/httpd.scoreboard

Timeout			300
KeepAlive		On
MaxKeepAliveRequests	100
KeepAliveTimeout	15

MinSpareServers		5
MaxSpareServers		10

StartServers		10

MaxClients		150

MaxRequestsPerChild	4096

LoadModule ssl_module         1.3/mod_ssl.so
LoadModule php4_module        1.3/libphp4.so


#  Reconstruction of the complete module list from all available modules
#  (static and shared ones) to achieve correct module execution order.
#  [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO]
#ClearModuleList
#AddModule mod_env.c
#AddModule mod_log_config.c
#AddModule mod_mime.c
#AddModule mod_negotiation.c
#AddModule mod_status.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_userdir.c
#AddModule mod_alias.c
#AddModule mod_rewrite.c
#AddModule mod_access.c
#AddModule mod_auth.c
#AddModule mod_so.c
#AddModule mod_setenvif.c
#AddModule mod_ssl.c
#AddModule mod_php4.c
#AddModule mod_php5.c

LoadModule config_log_module /usr/lib/apache/1.3/mod_log_config.so
LoadModule env_module /usr/lib/apache/1.3/mod_env.so
LoadModule rewrite_module /usr/lib/apache/1.3/mod_rewrite.so
LoadModule negotiation_module /usr/lib/apache/1.3/mod_negotiation.so
LoadModule mime_module /usr/lib/apache/1.3/mod_mime.so
LoadModule autoindex_module /usr/lib/apache/1.3/mod_autoindex.so
LoadModule status_module /usr/lib/apache/1.3/mod_status.so
LoadModule info_module /usr/lib/apache/1.3/mod_info.so
LoadModule includes_module /usr/lib/apache/1.3/mod_include.so
LoadModule asis_module /usr/lib/apache/1.3/mod_asis.so
LoadModule dir_module /usr/lib/apache/1.3/mod_dir.so
LoadModule cgi_module /usr/lib/apache/1.3/mod_cgi.so
# LoadModule anon_auth_module /usr/lib/apache/1.3/mod_auth_anon.so
LoadModule imap_module /usr/lib/apache/1.3/mod_imap.so
LoadModule action_module /usr/lib/apache/1.3/mod_actions.so
# LoadModule speling_module /usr/lib/apache/1.3/mod_speling.so
LoadModule userdir_module /usr/lib/apache/1.3/mod_userdir.so
LoadModule alias_module /usr/lib/apache/1.3/mod_alias.so
LoadModule access_module /usr/lib/apache/1.3/mod_access.so
LoadModule auth_module /usr/lib/apache/1.3/mod_auth.so
# LoadModule dbm_auth_module /usr/lib/apache/1.3/mod_auth_dbm.so
# LoadModule db_auth_module /usr/lib/apache/1.3/mod_auth_db.so
# LoadModule digest_module /usr/lib/apache/1.3/mod_digest.so
# LoadModule cern_meta_module /usr/lib/apache/1.3/mod_cern_meta.so
LoadModule expires_module /usr/lib/apache/1.3/mod_expires.so
# LoadModule headers_module /usr/lib/apache/1.3/mod_headers.so
# LoadModule usertrack_module /usr/lib/apache/1.3/mod_usertrack.so
LoadModule unique_id_module /usr/lib/apache/1.3/mod_unique_id.so
LoadModule setenvif_module /usr/lib/apache/1.3/mod_setenvif.so


ExtendedStatus On

### Section 2: 'Main' server configuration

Port 80


Listen 212.43.194.116:80
Listen 212.43.194.116:443

Listen 212.43.194.30:80
Listen 212.43.194.30:443

User  www-data
Group www-data

ServerAdmin webmaster@fr.clara.net

ServerName forms.claranet.fr

DocumentRoot "/usr/local/apache-1.3.28/htdocs"

<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

<Directory "/usr/local/apache-1.3.28/htdocs">

    Options Indexes FollowSymLinks MultiViews

    AllowOverride None

    Order allow,deny
    Allow from all
</Directory>

<IfModule mod_userdir.c>
    UserDir disabled
</IfModule>

<IfModule mod_dir.c>
    DirectoryIndex index.php index.html index.phtml
</IfModule>

AccessFileName .htaccess

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

UseCanonicalName On

<IfModule mod_mime.c>
    TypesConfig /etc/apache/mime.types
</IfModule>

DefaultType text/plain

<IfModule mod_mime_magic.c>
    MIMEMagicFile /etc/magic
</IfModule>

HostnameLookups Off

ErrorLog "|/usr/bin/cronolog /local-data/http-logs/%Y/%m/%d/%Y%m%d-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 "|/usr/bin/cronolog /local-data/http-logs/%Y/%m/%d/%Y%m%d-access_log" common

#CustomLog /usr/local/apache-1.3.28/logs/referer_log referer
#CustomLog /usr/local/apache-1.3.28/logs/agent_log agent

#CustomLog /usr/local/apache-1.3.28/logs/access_log combined

ServerSignature Off
ServerTokens ProductOnly

<IfModule mod_autoindex.c>

    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
    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

</IfModule>

<IfModule mod_mime.c>

    AddLanguage da .dk
    AddLanguage nl .nl
    AddLanguage en .en
    AddLanguage et .ee
    AddLanguage fr .fr
    AddLanguage de .de
    AddLanguage el .el
    AddLanguage he .he
    AddCharset ISO-8859-8 .iso8859-8
    AddLanguage it .it
    AddLanguage ja .ja
    AddCharset ISO-2022-JP .jis
    AddLanguage kr .kr
    AddCharset ISO-2022-KR .iso-kr
    AddLanguage nn .nn
    AddLanguage no .no
    AddLanguage pl .po
    AddCharset ISO-8859-2 .iso-pl
    AddLanguage pt .pt
    AddLanguage pt-br .pt-br
    AddLanguage ltz .lu
    AddLanguage ca .ca
    AddLanguage es .es
    AddLanguage sv .sv
    AddLanguage cs .cz .cs
    AddLanguage ru .ru
    AddLanguage zh-TW .zh-tw
    AddCharset Big5         .Big5    .big5
    AddCharset WINDOWS-1251 .cp-1251
    AddCharset CP866        .cp866
    AddCharset ISO-8859-5   .iso-ru
    AddCharset KOI8-R       .koi8-r
    AddCharset UCS-2        .ucs2
    AddCharset UCS-4        .ucs4
    AddCharset UTF-8        .utf8

    <IfModule mod_negotiation.c>
        LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ru ltz ca es sv tw
    </IfModule>

    AddType application/x-tar .tgz

    AddEncoding x-compress .Z
    AddEncoding x-gzip .gz .tgz

    AddType application/x-httpd-php .php .php3 .phtml .html

</IfModule>

# Format: Action media/type /cgi-script/location
# Format: Action handler-name /cgi-script/location

#ErrorDocument 500 "The server made a boo boo.
#ErrorDocument 404 /missing.html
#ErrorDocument 404 /cgi-bin/missing_handler.pl
#ErrorDocument 402 http://some.other-server.com/subscription_info.html

<IfModule mod_setenvif.c>
    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
</IfModule>

<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from 212.43.194.0/23
</Location>

#<Location /server-info>
#    SetHandler server-info
#    Order deny,allow
#    Deny from all
#    Allow from .your-domain.com
#</Location>

##  SSL Global Context

AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl    .crl

###############################################
#                PARAMS SSL                   #
###############################################

SSLPassPhraseDialog 	exec:/usr/local/libexec/ssldialog
#SSLSessionCache         dbm:/local-data/http-logs/ssl_scache
SSLSessionCacheTimeout  300
SSLMutex		file:/local-data/http-logs/ssl_mutex
SSLRandomSeed startup	builtin
SSLRandomSeed connect	builtin

SSLLog			"|/usr/bin/cronolog /local-data/http-logs/%Y/%m/%d/%Y%m%d-ssl_engine_log"
SSLLogLevel		info

###############################################
#                VIRTUAL HOSTS                #
###############################################

<Directory "/export/www/sites/www.claranew.fr/docs">

	php_value auto_append_file "/export/www/sites/www.claranew.fr/php/footer.php"
	php_value include_path	   ".:/export/www/sites/www.claranew.fr/php/:."

	<Files sess_infos.php>
		php_value auto_append_file  none
	</Files>
	<Files verif.php>
		php_value auto_append_file  none
	</Files>
	<Files confirm.php>
		php_value auto_append_file  none
	</Files>
</Directory>

<Directory "/export/www/sites/www.claranew.fr/docs/fast">
	php_value auto_append_file  none
</Directory>

<Directory "/export/www/sites/www.claranew.fr/docs/admin">
	<Files easy_gateway.php>
		php_value auto_append_file  none
	</Files>
</Directory>

<Directory "/export/www/sites/www.claranew.fr/docs/admin/phpMyAdmin*">
	php_value auto_append_file  none
</Directory>

#<Directory "/export/www/sites/www.claranew.fr/docs/admin/phpMyAdmin-mysql2">
#	php_value auto_append_file  none
#</Directory>

#<Directory "/export/www/sites/www.claranew.fr/docs/admin/phpMyAdmin-mysql3">
#    php_value auto_append_file  none
#</Directory>

#<Directory "/export/www/sites/www.claranew.fr/docs/admin/phpMyAdmin-mysql4">
#    php_value auto_append_file  none
#</Directory>

#<Directory "/export/www/sites/www.claranew.fr/docs/admin/phpMyAdmin-mysql5">
#    php_value auto_append_file  none
#</Directory>



<Directory "/export/www/sites/www.claranew.fr/docs/webtools">
    Options FollowSymLinks
    AllowOverride AuthConfig
</Directory>

<FilesMatch "html$">
	php_value auto_append_file  none
</FilesMatch>

# 212.43.194.116 HTTP ------------------------------------------------------------------------------------------------

NameVirtualHost 212.43.194.116:80


# virtual host par d�faut

<VirtualHost 212.43.194.116:80>
	ServerName 212.43.194.116
	RewriteEngine On
	RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
	RewriteRule .* - [F]
	# Les gens qui viennent en admin.leurnomdedomaine.com sont redirig�s vers l'interface client.
	RewriteCond %{HTTP_HOST}   ^admin\. [NC]
	RewriteRule ^/ https://ssl.claranet.fr/admin/ [R,L]
	# Les autres requetes sont redirig�es vers forms.claranet.fr
	RewriteRule ^/ https://ssl.claranet.fr/admin [R]
</VirtualHost>




<VirtualHost 212.43.194.116:80>
        ServerName forms.claranet.fr
        RewriteEngine On
        RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
        RewriteRule .* - [F]
        DocumentRoot /export/www/sites/www.claranew.fr/docs
        TransferLog /var/log/apache/forms.log
        ErrorLog /var/log/apache/forms-err.log
        Alias /img      "/export/www/sites/www.claranew.fr/img/"
        Alias /images   "/export/www/sites/www.claranew.fr/images/"
        Alias /pics     "/export/www/sites/www.claranew.fr/pics/"
        Alias /script   "/export/www/sites/www.claranew.fr/script/"
        Alias /flash    "/export/www/sites/www.claranew.fr/flash/"
</VirtualHost>



# 212.43.194.116 SSL -------------------------------------------------------------------------------------------------

NameVirtualHost 212.43.194.116:443

# ssl.claranet.fr

<VirtualHost 212.43.194.116:443>

	SSLEngine	on

	DocumentRoot	"/export/www/sites/www.claranew.fr/docs/"
	ServerName	ssl.claranet.fr
	ServerAdmin	website@webmaster.claranet.fr
	ErrorLog	"|/usr/bin/cronolog /local-data/http-logs/%Y/%m/%d/%Y%m%d-www.claranet.fr-ssl-error_log"
	TransferLog	"|/usr/bin/cronolog /local-data/http-logs/%Y/%m/%d/%Y%m%d-www.claranet.fr-ssl-access_log"

	SSLCipherSuite	ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL

	# SSLCertificateFile	/etc/apache/SSL/31012004/ssl.claranet.fr.crt
	# SSLCertificateKeyFile	/etc/apache/SSL/31012004/ssl.claranet.fr.key
	SSLCertificateFile	/etc/apache/SSL/30012006/ssl.claranet.fr.crt
	SSLCertificateKeyFile	/etc/apache/SSL/30012006/ssl.claranet.fr.key

	Alias /img	"/export/www/sites/www.claranew.fr/img/"
	Alias /images	"/export/www/sites/www.claranew.fr/images/"
	Alias /pics	"/export/www/sites/www.claranew.fr/pics/"
	Alias /script	"/export/www/sites/www.claranew.fr/script/"
	Alias /flash	"/export/www/sites/www.claranew.fr/flash/"

	ErrorDocument 404 /clara404.php

	<Files ~ "\.(cgi|shtml|phtml|php3?)$">
	    SSLOptions +StdEnvVars
	</Files>

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

	CustomLog "|/usr/bin/cronolog /local-data/http-logs/%Y/%m/%d/%Y%m%d-ssl_request_log" "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

	AddType application/x-httpd-php .php .phtml .html

	# Les acces aux anciens fichiers .php3 sur phpmyadmin sont redirig�s vers les .php

	RewriteEngine On

	RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
	RewriteRule .* - [F]

	RewriteRule ^/admin/phpMyAdmin/([^/]*)\.php3 https://ssl.claranet.fr/admin/phpMyAdmin/$1.php [R,L]
</VirtualHost>



# 212.43.194.30 HTTP ------------------------------------------------------------------------------------------------

NameVirtualHost 212.43.194.30:80

# virtual host par d�faut

<VirtualHost 212.43.194.30:80>
	ServerName 212.43.194.30
 	RedirectPermanent / https://ssl.claranet.fr/admin

	RewriteEngine On

	RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
	RewriteRule .* - [F]

</VirtualHost>


# 212.43.194.30 SSL -------------------------------------------------------------------------------------------------

NameVirtualHost 212.43.194.30:443

# redirection vers ssl.clara.net

<VirtualHost 212.43.194.30:443>
	ServerName 212.43.194.30

	RewriteEngine On

	RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
	RewriteRule .* - [F]

 	RedirectPermanent / https://ssl.claranet.fr/admin
</VirtualHost>
