Add Apache 2.4 vhosts example
This commit is contained in:
parent
8835ec5113
commit
94e4793fb7
111
docs/VHOST
111
docs/VHOST
@ -2,17 +2,17 @@ APACHE 2.2
|
||||
==========
|
||||
|
||||
<VirtualHost *:80>
|
||||
ServerName extranet.scores-decisions.com
|
||||
AddDefaultCharset utf-8
|
||||
DocumentRoot /var/www/extranet/public
|
||||
ServerName extranet.scores-decisions.com
|
||||
AddDefaultCharset utf-8
|
||||
DocumentRoot /var/www/extranet/public
|
||||
|
||||
SetEnv APPLICATION_ENV "production"
|
||||
SetEnv APPLICATION_ENV "production"
|
||||
|
||||
<Directory /var/www/extranet/public/>
|
||||
<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]
|
||||
@ -22,39 +22,38 @@ APACHE 2.2
|
||||
RewriteRule ^.*$ - [NC,L]
|
||||
RewriteRule ^.*$ index.php [NC,L]
|
||||
</IfModule>
|
||||
</Directory>
|
||||
|
||||
</Directory>
|
||||
|
||||
<IfModule mod_deflate.c>
|
||||
<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>
|
||||
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
|
||||
|
||||
ExpiresActive On
|
||||
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)$">
|
||||
<FilesMatch "\.(ico|flv|jpg|jpeg|png|gif|swf)$">
|
||||
Header unset Cookie
|
||||
Header unset Set-Cookie
|
||||
#Header set Cache-Control "max-age=432000, public"
|
||||
@ -62,9 +61,9 @@ APACHE 2.2
|
||||
Header append vary "User-Agent"
|
||||
ExpiresDefault "modification plus 5 days"
|
||||
FileEtag None
|
||||
</FilesMatch>
|
||||
</FilesMatch>
|
||||
|
||||
<FilesMatch "\.(js|css)$">
|
||||
<FilesMatch "\.(js|css)$">
|
||||
Header unset Cookie
|
||||
Header unset Set-Cookie
|
||||
#Header set Cache-Control "max-age=432000, public"
|
||||
@ -72,19 +71,43 @@ APACHE 2.2
|
||||
Header append vary "User-Agent"
|
||||
ExpiresDefault "modification plus 5 days"
|
||||
FileEtag None
|
||||
</FilesMatch>
|
||||
</FilesMatch>
|
||||
|
||||
BrowserMatch "MSIE" force-no-vary
|
||||
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
|
||||
# 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
|
||||
==========
|
||||
|
||||
|
||||
<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>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user