Kapitel 14: DAV & deflate
This commit is contained in:
parent
c76cfa8566
commit
cc1ed896cb
92
conf/kapitel/kapitel_14.conf
Normal file
92
conf/kapitel/kapitel_14.conf
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
##### Kapitel 14: WebDAV
|
||||||
|
|
||||||
|
### Allgemein/Immer
|
||||||
|
|
||||||
|
LoadModule dav_module modules/mod_dav.so
|
||||||
|
LoadModule dav_fs_module modules/mod_dav_fs.so
|
||||||
|
LoadModule dav_lock_module modules/mod_dav_lock.so
|
||||||
|
|
||||||
|
DavLockDB /tmp/dav.lock
|
||||||
|
|
||||||
|
### WebDAV ohne SSL und ohne Auth
|
||||||
|
|
||||||
|
<VirtualHost 172.31.31.107:80>
|
||||||
|
DocumentRoot /usr/local/apache2/htdocs-webdav.sv
|
||||||
|
ServerName webdav.sv
|
||||||
|
|
||||||
|
CustomLog logs/webdav-access.log combined
|
||||||
|
ErrorLog logs/webdav-error.log
|
||||||
|
|
||||||
|
<Location />
|
||||||
|
Dav On
|
||||||
|
</Location>
|
||||||
|
</VirtualHost>
|
||||||
|
|
||||||
|
### WebDAV mit SSL und Digest-Auth je Gruppe
|
||||||
|
|
||||||
|
<VirtualHost 172.31.31.107:443>
|
||||||
|
SSLEngine On
|
||||||
|
SSLCertificateFile "/usr/local/apache2/conf/ssl/localhost.crt"
|
||||||
|
SSLCertificateKeyFile "/usr/local/apache2/conf/ssl/localhost.key"
|
||||||
|
|
||||||
|
DocumentRoot /usr/local/apache2/htdocs-webdav.sv
|
||||||
|
ServerName webdav.sv
|
||||||
|
|
||||||
|
CustomLog logs/webdav_SSL-access.log combined
|
||||||
|
ErrorLog logs/webdav_SSL-error.log
|
||||||
|
|
||||||
|
<Location />
|
||||||
|
AuthType Digest
|
||||||
|
AuthName "WebDAV"
|
||||||
|
AuthUserFile /usr/local/apache2/htdigest.users
|
||||||
|
AuthGroupFile /usr/local/apache2/htgroups.webdav
|
||||||
|
|
||||||
|
<Limit GET HEAD OPTIONS PROPFIND>
|
||||||
|
Require group ro rw
|
||||||
|
</Limit>
|
||||||
|
|
||||||
|
<LimitExcept GET HEAD OPTIONS PROPFIND>
|
||||||
|
Require group rw
|
||||||
|
</LimitExcept>
|
||||||
|
|
||||||
|
Dav On
|
||||||
|
</Location>
|
||||||
|
</VirtualHost>
|
||||||
|
|
||||||
|
|
||||||
|
##### Kapitel 14: Komprimierte Auslieferung
|
||||||
|
|
||||||
|
### mod_deflate aka "Accept-Encoding: gzip"
|
||||||
|
|
||||||
|
LoadModule deflate_module modules/mod_deflate.so
|
||||||
|
|
||||||
|
# Das meiste per Brotli
|
||||||
|
# AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript application/javascript application/json
|
||||||
|
AddOutputFilterByType DEFLATE text/xml application/json
|
||||||
|
# Schlechte Beispiele:
|
||||||
|
AddOutputFilterByType DEFLATE application/x-font-ttf application/vnd.ms-fontobject image/x-icon
|
||||||
|
DeflateFilterNote Input deflate_input_info
|
||||||
|
DeflateFilterNote Output deflate_output_info
|
||||||
|
DeflateFilterNote Ratio deflate_ratio_info
|
||||||
|
|
||||||
|
LogFormat '"%r" %{output_info}n/%{input_info}n (%{ratio_info}n%%)' deflate_compress
|
||||||
|
CustomLog "|bin/rotatelogs logs/deflate_log.%Y%m%d 86400" deflate_compress
|
||||||
|
|
||||||
|
|
||||||
|
### mod_brotli aka "Accept-Encoding: br"
|
||||||
|
|
||||||
|
LoadModule brotli_module modules/mod_brotli.so
|
||||||
|
|
||||||
|
AddOutputFilterByType BROTLI_COMPRESS text/html text/plain text/css text/javascript application/x-javascript application/javascript
|
||||||
|
# per gzip:
|
||||||
|
# AddOutputFilterByType BROTLI_COMPRESS text/xml application/json
|
||||||
|
|
||||||
|
BrotliFilterNote Input brotli_input_info
|
||||||
|
BrotliFilterNote Output brotli_output_info
|
||||||
|
BrotliFilterNote Ratio brotli_ratio_info
|
||||||
|
|
||||||
|
LogFormat '"%r" %{brotli_output_info}n/%{brotli_input_info}n (%{brotli_ratio_info}n%%)' brotli_compress
|
||||||
|
CustomLog logs/brotli.log brotli_compress
|
||||||
|
|
||||||
|
# https://bytepursuits.com/apache-enabling-brotli-compression-with-gzip-deflate-fallback
|
||||||
|
|
Loading…
Reference in a new issue