<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
-<!-- English Revision: 1666026:1673563 (outdated) -->
+<!-- English Revision: 1673563 -->
<!-- French translation : Lucien GENTIS -->
<!-- Reviewed by : Vincent Deffontaines -->
<highlight language="config">
RewriteEngine On
-RewriteCond %{TIME_HOUR} >=20 [OR]
-RewriteCond %{TIME_HOUR} <07
-RewriteRule ^/fridge - [F]
+RewriteCond "%{TIME_HOUR}" ">=20" [OR]
+RewriteCond "%{TIME_HOUR}" "<07"
+RewriteRule "^/fridge" "-" [F]
</highlight>
<p>Toute requête arrivant après 20h ou avant 7h du matin provoquera
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.fr.xsl"?>
-<!-- English Revision: 1599844:1673563 (outdated) -->
+<!-- English Revision: 1673563 -->
<!-- French translation : Lucien GENTIS -->
<!-- Reviwed by : Vincent Deffontaines -->
utiliser les directives suivantes, soit dans le fichier
<code>/usr/local/apache/htdocs/secret/.htaccess</code>, soit dans le
fichier <code>httpd.conf</code> à l'intérieur d'une section <Directory
- /usr/local/apache/htdocs/secret> :</p>
+ "/usr/local/apache/htdocs/secret"> :</p>
<highlight language="config">
AuthType Basic
AuthName "Restricted Files"
# (Following line optional)
AuthBasicProvider file
-AuthUserFile /usr/local/apache/passwd/passwords
+AuthUserFile "/usr/local/apache/passwd/passwords"
Require user rbowen
</highlight>
AuthName "By Invitation Only"
# Optional line:
AuthBasicProvider file
-AuthUserFile /usr/local/apache/passwd/passwords
-AuthGroupFile /usr/local/apache/passwd/groups
+AuthUserFile "/usr/local/apache/passwd/passwords"
+AuthGroupFile "/usr/local/apache/passwd/groups"
Require group GroupName
</highlight>
fichier texte :</p>
<highlight language="config">
-<Directory /www/docs/private>
+<Directory "/www/docs/private">
AuthName "Private"
AuthType Basic
AuthBasicProvider dbm
- AuthDBMUserFile /www/passwords/passwd.dbm
+ AuthDBMUserFile "/www/passwords/passwd.dbm"
Require valid-user
</Directory>
file et LDAP :</p>
<highlight language="config">
-<Directory /www/docs/private>
+<Directory "/www/docs/private">
AuthName "Private"
AuthType Basic
AuthBasicProvider file ldap
- AuthUserFile /usr/local/apache/passwd/passwords
+ AuthUserFile "/usr/local/apache/passwd/passwords"
AuthLDAPURL ldap://ldaphost/o=yourorg
Require valid-user
de groupes LDAP.</p>
<highlight language="config">
-<Directory /www/docs/private>
+<Directory "/www/docs/private">
AuthName "Private"
AuthType Basic
AuthBasicProvider file
- AuthUserFile /usr/local/apache/passwd/passwords
+ AuthUserFile "/usr/local/apache/passwd/passwords"
AuthLDAPURL ldap://ldaphost/o=yourorg
- AuthGroupFile /usr/local/apache/passwd/groups
+ AuthGroupFile "/usr/local/apache/passwd/groups"
Require group GroupName
Require ldap-group cn=mygroup,o=yourorg
<?xml version='1.0' encoding='ISO-8859-1' ?>
<!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.fr.xsl"?>
-<!-- English Revision: 1562488:1673563 (outdated) -->
+<!-- English Revision: 1673563 -->
<!-- French translation by Vincent Deffontaines, Alain B. -->
<!-- reviewed by Lucien Gentis -->
# Apache doit écouter sur le port 80
Listen 80
<VirtualHost *:80>
- DocumentRoot /www/example1
+ DocumentRoot "/www/example1"
ServerName www.example.com
# Autres directives ici
</VirtualHost>
<VirtualHost *:80>
- DocumentRoot /www/example2
+ DocumentRoot "/www/example2"
ServerName www.example.org
# Autres directives ici
# Serveur "principal" sur 172.20.30.40
ServerName server.example.com
-DocumentRoot /www/mainserver
+DocumentRoot "/www/mainserver"
<VirtualHost 172.20.30.50>
- DocumentRoot /www/example1
+ DocumentRoot "/www/example1"
ServerName www.example.com
# D'autres directives ici ...
</VirtualHost>
<VirtualHost 172.20.30.50>
- DocumentRoot /www/example2
+ DocumentRoot "/www/example2"
ServerName www.example.org
# D'autres directives ici ...
<highlight language="config">
<VirtualHost 192.168.1.1 172.20.30.40>
- DocumentRoot /www/server1
+ DocumentRoot "/www/server1"
ServerName server.example.com
ServerAlias server
</VirtualHost>
<VirtualHost 172.20.30.40:80>
ServerName www.example.com
- DocumentRoot /www/domain-80
+ DocumentRoot "/www/domain-80"
</VirtualHost>
<VirtualHost 172.20.30.40:8080>
ServerName www.example.com
- DocumentRoot /www/domain-8080
+ DocumentRoot "/www/domain-8080"
</VirtualHost>
<VirtualHost 172.20.30.40:80>
ServerName www.example.org
- DocumentRoot /www/otherdomain-80
+ DocumentRoot "/www/otherdomain-80"
</VirtualHost>
<VirtualHost 172.20.30.40:8080>
ServerName www.example.org
- DocumentRoot /www/otherdomain-8080
+ DocumentRoot "/www/otherdomain-8080"
</VirtualHost>
</highlight>
Listen 80
<VirtualHost 172.20.30.40>
- DocumentRoot /www/example1
+ DocumentRoot "/www/example1"
ServerName www.example.com
</VirtualHost>
<VirtualHost 172.20.30.50>
- DocumentRoot /www/example2
+ DocumentRoot "/www/example2"
ServerName www.example.org
</VirtualHost>
</highlight>
Listen 172.20.30.50:8080
<VirtualHost 172.20.30.40:80>
- DocumentRoot /www/example1-80
+ DocumentRoot "/www/example1-80"
ServerName www.example.com
</VirtualHost>
<VirtualHost 172.20.30.40:8080>
- DocumentRoot /www/example1-8080
+ DocumentRoot "/www/example1-8080"
ServerName www.example.com
</VirtualHost>
<VirtualHost 172.20.30.50:80>
- DocumentRoot /www/example2-80
+ DocumentRoot "/www/example2-80"
ServerName www.example.org
</VirtualHost>
<VirtualHost 172.20.30.50:8080>
- DocumentRoot /www/example2-8080
+ DocumentRoot "/www/example2-8080"
ServerName www.example.org
</VirtualHost>
</highlight>
<highlight language="config">
Listen 80
<VirtualHost 172.20.30.40>
- DocumentRoot /www/example1
+ DocumentRoot "/www/example1"
ServerName www.example.com
</VirtualHost>
<VirtualHost 172.20.30.40>
- DocumentRoot /www/example2
+ DocumentRoot "/www/example2"
ServerName www.example.org
</VirtualHost>
<VirtualHost 172.20.30.40>
- DocumentRoot /www/example3
+ DocumentRoot "/www/example3"
ServerName www.example.net
</VirtualHost>
# IP-based
<VirtualHost 172.20.30.50>
- DocumentRoot /www/example4
+ DocumentRoot "/www/example4"
ServerName www.example.edu
</VirtualHost>
<VirtualHost 172.20.30.60>
- DocumentRoot /www/example5
+ DocumentRoot "/www/example5"
ServerName www.example.gov
</VirtualHost>
</highlight>
<highlight language="config">
<VirtualHost *:*>
ProxyPreserveHost On
- ProxyPass / http://192.168.111.2/
- ProxyPassReverse / http://192.168.111.2/
+ ProxyPass "/" "http://192.168.111.2/"
+ ProxyPassReverse "/" "http://192.168.111.2/"
ServerName hostname.example.com
</VirtualHost>
</highlight>
<highlight language="config">
<VirtualHost _default_:*>
- DocumentRoot /www/default
+ DocumentRoot "/www/default"
</VirtualHost>
</highlight>
<highlight language="config">
<VirtualHost _default_:80>
- DocumentRoot /www/default80
+ DocumentRoot "/www/default80"
# ...
</VirtualHost>
<VirtualHost _default_:*>
- DocumentRoot /www/default
+ DocumentRoot "/www/default"
# ...
</VirtualHost>
</highlight>
<highlight language="config">
<VirtualHost _default_:80>
-DocumentRoot /www/default
+DocumentRoot "/www/default"
...
</VirtualHost>
</highlight>
<highlight language="config">
Listen 80
ServerName www.example.com
-DocumentRoot /www/example1
+DocumentRoot "/www/example1"
<VirtualHost 172.20.30.40 172.20.30.50>
- DocumentRoot /www/example2
+ DocumentRoot "/www/example2"
ServerName www.example.org
# ...
</VirtualHost>
<VirtualHost 172.20.30.40>
- DocumentRoot /www/example3
+ DocumentRoot "/www/example3"
ServerName www.example.net
ServerAlias *.example.net
# ...
<highlight language="config">
<VirtualHost 172.20.30.40>
# serveur virtuel primaire
- DocumentRoot /www/subdomain
+ DocumentRoot "/www/subdomain"
RewriteEngine On
- RewriteRule . /www/subdomain/index.html
+ RewriteRule "." "/www/subdomain/index.html"
# ...
</VirtualHost>
<VirtualHost 172.20.30.40>
-DocumentRoot /www/subdomain/sub1
+DocumentRoot "/www/subdomain/sub1"
ServerName www.sub1.domain.tld
- ServerPath /sub1/
+ ServerPath "/sub1/"
RewriteEngine On
- RewriteRule ^(/sub1/.*) /www/subdomain$1
+ RewriteRule "^(/sub1/.*)" "/www/subdomain$1
# ...
</VirtualHost>
<VirtualHost 172.20.30.40>
- DocumentRoot /www/subdomain/sub2
+ DocumentRoot "/www/subdomain/sub2"
ServerName www.sub2.domain.tld
- ServerPath /sub2/
+ ServerPath "/sub2/"
RewriteEngine On
- RewriteRule ^(/sub2/.*) /www/subdomain$1
+ RewriteRule "^(/sub2/.*)" "/www/subdomain$1"
# ...
</VirtualHost>
</highlight>
<?xml version='1.0' encoding='ISO-8859-1' ?>
<!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
-<!-- English Revision: 1334000:1673563 (outdated) -->
+<!-- English Revision: 1673563 -->
<!-- French translation by alain B, review by Vincent Deffontaines -->
<!-- Updated by Lucien Gentis -->
<highlight language="config">
<VirtualHost 172.20.30.40:80>
ServerAdmin webmaster@www1.example.com
- DocumentRoot /www/vhosts/www1
+ DocumentRoot "/www/vhosts/www1"
ServerName www1.example.com
- ErrorLog /www/logs/www1/error_log
- CustomLog /www/logs/www1/access_log combined
+ ErrorLog "/www/logs/www1/error_log"
+ CustomLog "/www/logs/www1/access_log" combined
</VirtualHost>
<VirtualHost 172.20.30.50:80>
ServerAdmin webmaster@www2.example.org
- DocumentRoot /www/vhosts/www2
+ DocumentRoot "/www/vhosts/www2"
ServerName www2.example.org
- ErrorLog /www/logs/www2/error_log
- CustomLog /www/logs/www2/access_log combined
+ ErrorLog "/www/logs/www2/error_log"
+ CustomLog "/www/logs/www2/access_log" combined
</VirtualHost>
</highlight>
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.fr.xsl"?>
-<!-- English Revision: 1334000:1673563 (outdated) -->
+<!-- English Revision: 1673563 -->
<!-- French translation : Lucien GENTIS -->
<!--
<highlight language="config">
<VirtualHost 111.22.33.44>
ServerName customer-1.example.com
- DocumentRoot /www/hosts/customer-1.example.com/docs
- ScriptAlias /cgi-bin/ /www/hosts/customer-1.example.com/cgi-bin
+ DocumentRoot "/www/hosts/customer-1.example.com/docs"
+ ScriptAlias "/cgi-bin/" "/www/hosts/customer-1.example.com/cgi-bin"
</VirtualHost>
<VirtualHost 111.22.33.44>
ServerName customer-2.example.com
- DocumentRoot /www/hosts/customer-2.example.com/docs
- ScriptAlias /cgi-bin/ /www/hosts/customer-2.example.com/cgi-bin
+ DocumentRoot "/www/hosts/customer-2.example.com/docs"
+ ScriptAlias "/cgi-bin/" "/www/hosts/customer-2.example.com/cgi-bin"
</VirtualHost>
<VirtualHost 111.22.33.44>
ServerName customer-N.example.com
- DocumentRoot /www/hosts/customer-N.example.com/docs
- ScriptAlias /cgi-bin/ /www/hosts/customer-N.example.com/cgi-bin
+ DocumentRoot "/www/hosts/customer-N.example.com/docs"
+ ScriptAlias "/cgi-bin/" "/www/hosts/customer-N.example.com/cgi-bin"
</VirtualHost>
</highlight>
# ce format de journal peut être éclaté en journaux par serveur virtuel
# à l'aide du premier champ via l'utilitaire split-logfile
LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
-CustomLog logs/access_log vcommon
+CustomLog "logs/access_log" vcommon
# inclut le nom du serveur dans les noms de fichiers ressources
# nécessaires aux traitements des requêtes
-VirtualDocumentRoot /www/hosts/%0/docs
-VirtualScriptAlias /www/hosts/%0/cgi-bin
+VirtualDocumentRoot "/www/hosts/%0/docs"
+VirtualScriptAlias "/www/hosts/%0/cgi-bin"
</highlight>
<p>Pour changer cette configuration en solution de serveur virtuel
CustomLog logs/access_log vcommon
# insertion d'une partie du nom du serveur dans les noms de fichiers
-VirtualDocumentRoot /home/%2/www
+VirtualDocumentRoot "/home/%2/www"
# répertoire cgi-bin unique
-ScriptAlias /cgi-bin/ /www/std-cgi/
+ScriptAlias "/cgi-bin/" "/www/std-cgi/"
</highlight>
<p>Vous trouverez des exemples plus élaborés d'utilisation de la
LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
-<Directory /www/commercial>
+<Directory "/www/commercial">
Options FollowSymLinks
AllowOverride All
</Directory>
-<Directory /www/homepages>
+<Directory "/www/homepages">
Options FollowSymLinks
AllowOverride None
</Directory>
<VirtualHost 111.22.33.44>
ServerName www.commercial.example.com
- CustomLog logs/access_log.commercial vcommon
+ CustomLog "logs/access_log.commercial" vcommon
- VirtualDocumentRoot /www/commercial/%0/docs
- VirtualScriptAlias /www/commercial/%0/cgi-bin
+ VirtualDocumentRoot "/www/commercial/%0/docs"
+ VirtualScriptAlias "/www/commercial/%0/cgi-bin"
</VirtualHost>
<VirtualHost 111.22.33.45>
ServerName www.homepages.example.com
- CustomLog logs/access_log.homepages vcommon
+ CustomLog "logs/access_log.homepages" vcommon
- VirtualDocumentRoot /www/homepages/%0/docs
- ScriptAlias /cgi-bin/ /www/std-cgi/
+ VirtualDocumentRoot "/www/homepages/%0/docs"
+ ScriptAlias "/cgi-bin/" "/www/std-cgi/"
</VirtualHost>
</highlight>
# insertion de l'adresse IP dans les journaux afin de pouvoir les
# éclater
LogFormat "%A %h %l %u %t \"%r\" %s %b" vcommon
-CustomLog logs/access_log vcommon
+CustomLog "logs/access_log" vcommon
# insertion de l'adresse IP dans les noms de fichiers
-VirtualDocumentRootIP /www/hosts/%0/docs
-VirtualScriptAliasIP /www/hosts/%0/cgi-bin
+VirtualDocumentRootIP "/www/hosts/%0/docs"
+VirtualScriptAliasIP "/www/hosts/%0/cgi-bin"
</highlight>
</section>
<?xml version='1.0' encoding='ISO-8859-1' ?>
<!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.fr.xsl"?>
-<!-- English Revision: 1647230:1673563 (outdated) -->
+<!-- English Revision: 1673563 -->
<!-- French translation by alain B, review by Vincent Deffontaines
updated by Lucien GENTIS -->
# serveur par défaut pour *:80
ServerName www.example.com
ServerAlias example.com
- DocumentRoot /www/domain
+ DocumentRoot "/www/domain"
</VirtualHost>
<VirtualHost *:80>
ServerName other.example.com
- DocumentRoot /www/otherdomain
+ DocumentRoot "/www/otherdomain"
</VirtualHost>
</highlight>