Virtualhost Apache 2.4+

SAdmins ›› Installation ›› Serveur web ››
Parent Previous Next

# Médiacad

# Modifier les chaînes ***xxx*** en fonction de votre environnement


Listen ***server_name***:80

NameVirtualHost ***server_name***:80


<VirtualHost ***server***:80>

   ServerAdmin ***mail_sadmin***

   DocumentRoot "***path_de_Médiacad***/public"

   ServerName ***server_name***

   SetEnvIf Request_URI "^/ws/encode/getnexttask$" dontlog

   ErrorLog "***path+nom_fichier_de_log***"

   CustomLog "***path+nom_fichier_de_log_access***" common env=!dontlog

   XSendFile On

   XSendFilePath ***path_des_fichiers_medias***/


   Options -Indexes


   <Directory "***path_de_Médiacad***/public">

       Options -Indexes +FollowSymlinks

       DirectoryIndex index.php

       Order deny,allow

       Allow from all

   </Directory>


   <Location />

       RewriteEngine on

       RewriteCond %{REQUEST_FILENAME} -s [OR]

       RewriteCond %{REQUEST_FILENAME} -l [OR]

       RewriteCond %{REQUEST_FILENAME} -d

       RewriteRule ^.*$ - [NC,L]

       RewriteRule ^.*$ index.php [NC,L]

   </Location>


   # valeurs possibles : development|production

   SetEnv APPLICATION_ENV production


   # valeurs possibles : on|off

   SetEnv APPLICATION_DEBUG on


   # valeurs possibles : normal|update

   SetEnv APPLICATION_MODE normal


   # valeurs possibles : warning|files|database

   SetEnv APPLICATION_UPDATE_STEP warning


   # ATTENTION : penser à rajouter le path si Médiacad n'est pas à la racine du site

   # Par exemple, pour une uri du type ent2d.ac-bordeaux.fr/mediacad/pr/media...,

   # indiquer <If "%{THE_REQUEST} =~ m#^POST /mediacad/pr/media/(add|edit)#">

   # MODIFIER les valeurs en fonction de la config de Médiacad

   <If "%{THE_REQUEST} =~ m#^(GET|POST) /pr/media/(add|edit)#">

         php_value post_max_size "520M"

         php_value upload_max_filesize "520M"

   </If>

   <If "%{THE_REQUEST} =~ m#^POST /pr/media/(add|edit)#">

         php_value max_input_time 3600

         php_value max_execution_time 4500

         php_value memory_limit -1

   </If>


   php_value date.timezone "Europe/Paris"

   php_value error_reporting 6143

   php_value iconv.input_encoding "UTF-8"

   php_value iconv.internal_encoding "UTF-8"

   php_value iconv.output_encoding "UTF-8"

   php_value mbstring.language "UTF-8"

   php_value mbstring.internal_encoding "UTF-8"

   php_value mbstring.http_input "UTF-8"

   php_value mbstring.http_output "UTF-8"

   php_value mbstring.detect_order "UTF-8"

   php_value session.cookie_lifetime 0



   #Optimisations : mod_deflate et mod_cache

   AddOutputFilter DEFLATE js css htm html xml php

   ExpiresActive On

   ExpiresByType image/gif "access plus 7 days"

   ExpiresByType image/jpg "access plus 7 days"

   ExpiresByType image/jpeg "access plus 7 days"

   ExpiresByType image/png "access plus 7 days"

   ExpiresByType image/swf "access plus 7 days"

   ExpiresByType application/pdf "access plus 7 days"

   ExpiresByType application/zip "access plus 7 days"

   ExpiresByType application/bz2 "access plus 7 days"

   ExpiresByType application/gz "access plus 7 days"

   ExpiresByType text/html "access plus 7 days"

   ExpiresByType text/htm "access plus 7 days"

   ExpiresByType text/js "access plus 30 days"

   ExpiresByType text/x-js "access plus 30 days"

   ExpiresByType text/javascript "access plus 30 days"

   ExpiresByType text/css "access plus 30 days"

   ExpiresByType text/ico "access plus 30 days"

   ExpiresByType text/txt "access plus 30 days"



</VirtualHost>

Créé avec HelpNDoc Personal Edition: Générateur de documentation et EPub facile