extranet/docs/VHOST

114 lines
3.8 KiB
Plaintext
Raw Normal View History

2013-11-05 15:45:25 +01:00
APACHE 2.2
==========
2012-02-16 10:49:31 +01:00
<VirtualHost *:80>
2015-01-15 16:31:39 +01:00
ServerName extranet.scores-decisions.com
AddDefaultCharset utf-8
DocumentRoot /var/www/extranet/public
2012-02-16 10:49:31 +01:00
2015-01-15 16:31:39 +01:00
SetEnv APPLICATION_ENV "production"
2012-02-16 10:49:31 +01:00
2015-01-15 16:31:39 +01:00
<Directory /var/www/extranet/public/>
2012-02-16 10:49:31 +01:00
AllowOverride none
Order allow,deny
Allow from all
2015-01-15 16:31:39 +01:00
2012-02-16 10:49:31 +01:00
<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>
2015-01-15 16:31:39 +01:00
</Directory>
2012-02-16 10:49:31 +01:00
2015-01-15 16:31:39 +01:00
<IfModule mod_deflate.c>
2012-02-16 10:49:31 +01:00
<Location />
2015-01-15 16:31:39 +01:00
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
2012-02-16 10:49:31 +01:00
2015-01-15 16:31:39 +01:00
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
2012-02-16 10:49:31 +01:00
2015-01-15 16:31:39 +01:00
<FilesMatch "\.(ico|flv|jpg|jpeg|png|gif|swf)$">
2012-02-16 10:49:31 +01:00
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
2015-01-15 16:31:39 +01:00
</FilesMatch>
2012-02-16 10:49:31 +01:00
2015-01-15 16:31:39 +01:00
<FilesMatch "\.(js|css)$">
2012-02-16 10:49:31 +01:00
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
2015-01-15 16:31:39 +01:00
</FilesMatch>
2012-02-16 10:49:31 +01:00
2015-01-15 16:31:39 +01:00
BrowserMatch "MSIE" force-no-vary
2012-02-16 10:49:31 +01:00
2015-01-15 16:31:39 +01:00
# 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
2012-02-16 10:49:31 +01:00
</VirtualHost>
2013-11-05 15:45:25 +01:00
APACHE 2.4
==========
2015-01-15 16:31:39 +01:00
<VirtualHost *:80>
ServerName extranet.sd.dev
AddDefaultCharset utf-8
SetEnv APPLICATION_ENV "development"
DirectoryIndex index.php
DocumentRoot /home/vhosts/extranet/public
<Directory /home/vhosts/extranet/public/>
EnableSendfile Off
AllowOverride none
Require all granted
<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>
# Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
LogLevel debug
ErrorLog /home/vhosts/apachelog/extranet-error.log
CustomLog /home/vhosts/apachelog/extranet-access.log combined
</VirtualHost>