extranet/docs/VHOST
2013-11-04 08:53:13 +00:00

87 lines
2.8 KiB
Plaintext

APACHE 2.2
==========
<VirtualHost *>
ServerName extranet.scores-decisions.com
AddDefaultCharset utf-8
DocumentRoot /var/www/extranet/public
SetEnv APPLICATION_ENV "production"
<Directory /var/www/extranet/public/>
AllowOverride none
Order allow,deny
Allow from all
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteCond %{REQUEST_URI} ^/favicon.ico$ [OR]
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>
</Directory>
<IfModule mod_deflate.c>
<Location />
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/x-http-php
SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:ext|t?gz|zip|bz2|sit|tar)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:pdf|avi|mov|mp3|mp4|rm)$ no-gzip dont-vary
Header append Vary User-Agent env=!dont-vary
</Location>
</IfModule>
ExpiresActive On
<FilesMatch "\.(ico|flv|jpg|jpeg|png|gif|swf)$">
Header unset Cookie
Header unset Set-Cookie
#Header set Cache-Control "max-age=432000, public"
Header set vary "Accept-Encoding"
Header append vary "User-Agent"
ExpiresDefault "modification plus 5 days"
FileEtag None
</FilesMatch>
<FilesMatch "\.(js|css)$">
Header unset Cookie
Header unset Set-Cookie
#Header set Cache-Control "max-age=432000, public"
Header set vary "Accept-Encoding"
Header append vary "User-Agent"
ExpiresDefault "modification plus 5 days"
FileEtag None
</FilesMatch>
BrowserMatch "MSIE" force-no-vary
# Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
LogLevel error
ErrorLog /var/log/apache2/extranet-error.log
CustomLog /var/log/apache2/extranet-access.log combined
</VirtualHost>
APACHE 2.4
==========