2010-09-22 09:19:17 +00:00
|
|
|
Configuration local
|
|
|
|
===================
|
2010-09-22 15:27:56 +00:00
|
|
|
Voir Configuration vhost
|
2010-09-22 09:19:17 +00:00
|
|
|
|
2010-09-22 15:27:56 +00:00
|
|
|
Pour spécifier le mode de fonctionnement, modifier la variable APPLICATION_ENV,
|
|
|
|
dans le vhost
|
2010-09-22 09:19:17 +00:00
|
|
|
|
2010-09-22 15:27:56 +00:00
|
|
|
SetEnv APPLICATION_ENV "PRD" => Production
|
|
|
|
SetEnv APPLICATION_ENV "REC" => Recette
|
|
|
|
SetEnv APPLICATION_ENV "DEV" => Developpement
|
|
|
|
|
|
|
|
Liens symbolique
|
|
|
|
===================================
|
|
|
|
ln -s PATH_DATA/logos PATH_SITE/cache/logos
|
|
|
|
ln -s PATH_SITE/www/img PATH_SITE/cache/img
|
|
|
|
ln -s PATH_DATA PATH_SITE/data
|
|
|
|
|
|
|
|
Sous windows, utiliser l'utilitaire junction de Sysinternal
|
2010-09-22 09:19:17 +00:00
|
|
|
|
|
|
|
Développement PHP
|
|
|
|
=================
|
|
|
|
La configuration est chargé à partir du fichier index.php (config/prepend.php)
|
|
|
|
Toutes les requêtes doivent passer par le fichier index.php directement ou par
|
|
|
|
une règle de réecriture d'url.
|
|
|
|
|
|
|
|
@todo
|
|
|
|
A terme les fichiers tel que servefile.php et servescripts.php devront
|
|
|
|
disparaître pour passer par le fichier index.php
|
|
|
|
|
|
|
|
Configuration vhost
|
|
|
|
===================
|
|
|
|
<VirtualHost *:80>
|
|
|
|
ServerAdmin webmaster@extranet.devlocal.com
|
2010-09-22 15:27:56 +00:00
|
|
|
ServerName extranet.sd.dev
|
2010-09-22 09:19:17 +00:00
|
|
|
AddDefaultCharset UTF-8
|
|
|
|
DocumentRoot "D:/www/extranet/www"
|
2010-09-22 15:27:56 +00:00
|
|
|
SetEnv APPLICATION_ENV "PRD"
|
2010-09-22 09:19:17 +00:00
|
|
|
<Directory "D:/www/extranet/www/">
|
|
|
|
Options Indexes FollowSymLinks
|
|
|
|
AllowOverride All
|
|
|
|
Order allow,deny
|
|
|
|
Allow from all
|
|
|
|
|
|
|
|
<IfModule mod_rewrite.c>
|
2010-09-22 15:27:56 +00:00
|
|
|
RewriteEngine On
|
|
|
|
RewriteBase /
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
|
|
RewriteCond %{REQUEST_URI} !=/favicon.ico
|
|
|
|
RewriteRule ^print/(.*)-(.*)-(.*)-(.*).pdf ./index.php?sortie=pdf&siret=$1&idEntreprise=$2&page=$3¶ms=$4 [L,NC]
|
|
|
|
RewriteRule ^fichier/(.*)/(.*)$ ./servefile.php?q=$1/$2 [L,NC]
|
|
|
|
RewriteRule ^imgcache/(.*)$ ./servefile.php?q=imgcache/$1 [L,NC]
|
|
|
|
RewriteRule ^pdf/(.*)$ ./servefile.php?q=pdf/$1 [L,NC]
|
|
|
|
RewriteRule ^logos/(.*)$ ./servefile.php?q=logos/$1 [L,NC]
|
|
|
|
RewriteRule ^scripts/(.*)$ ./servescripts.php?q=$1 [L,NC]
|
2010-09-22 09:19:17 +00:00
|
|
|
</IfModule>
|
|
|
|
</Directory>
|
2010-09-22 15:27:56 +00:00
|
|
|
|
|
|
|
<Directory "D:/www/extranet/www/localauth/">
|
|
|
|
<IfModule mod_rewrite.c>
|
|
|
|
RewriteEngine on
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
|
|
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
|
|
|
|
</IfModule>
|
|
|
|
</Directory>
|
2010-09-22 09:19:17 +00:00
|
|
|
|
|
|
|
<Directory "D:/www/extranet/www/min/">
|
|
|
|
<IfModule mod_rewrite.c>
|
2010-09-22 15:27:56 +00:00
|
|
|
RewriteEngine on
|
|
|
|
RewriteRule ^([a-z]=.*) index.php?$1 [L,NE]
|
2010-09-22 09:19:17 +00:00
|
|
|
</IfModule>
|
|
|
|
</Directory>
|
|
|
|
|
|
|
|
# Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
|
|
|
|
LogLevel debug
|
|
|
|
ErrorLog "logs/extranet.devlocal.com-error.log"
|
|
|
|
CustomLog "logs/extranet.devlocal.com-access.log" common
|
|
|
|
</VirtualHost>
|
|
|
|
|
|
|
|
|
|
|
|
Rewrite Log
|
|
|
|
===========
|
|
|
|
<IfModule mod_rewrite.c>
|
|
|
|
RewriteLog "logs/extranet.devlocal.com-rewrite.log"
|
|
|
|
#RewriteLogLevel 3
|
|
|
|
</IfModule>
|
|
|
|
|
|
|
|
Compression
|
|
|
|
===========
|
|
|
|
|
|
|
|
<Location />
|
|
|
|
# Netscape 4.x has some problems...
|
|
|
|
BrowserMatch ^Mozilla/4 gzip-only-text/html
|
|
|
|
|
|
|
|
# Netscape 4.06-4.08 have some more problems
|
|
|
|
BrowserMatch ^Mozilla/4\.0[678] no-gzip
|
|
|
|
|
|
|
|
# MSIE masquerades as Netscape, but it is fine
|
|
|
|
# BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
|
|
|
|
|
|
|
|
# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
|
|
|
|
# the above regex won't work. You can use the following
|
|
|
|
# workaround to get the desired effect:
|
|
|
|
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
|
|
|
|
|
|
|
|
#AddOutputFilterByType DEFLATE text/css
|
|
|
|
AddOutputFilterByType DEFLATE text/javascript
|
|
|
|
AddOutputFilterByType DEFLATE application/x-javascript
|
|
|
|
|
|
|
|
Header append Vary User-Agent env=!dont-vary
|
|
|
|
</Location>
|
|
|
|
|