extranet/config/README

114 lines
3.4 KiB
Plaintext
Raw Normal View History

Configuration local
===================
Voir Configuration vhost
Pour spécifier le mode de fonctionnement, modifier la variable APPLICATION_ENV,
dans le vhost
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
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
ServerName extranet.sd.dev
AddDefaultCharset UTF-8
DocumentRoot "D:/www/extranet/www"
SetEnv APPLICATION_ENV "PRD"
<Directory "D:/www/extranet/www/">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
<IfModule mod_rewrite.c>
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&params=$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]
</IfModule>
</Directory>
<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>
<Directory "D:/www/extranet/www/min/">
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^([a-z]=.*) index.php?$1 [L,NE]
</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>