Merge branch 'add-apache-cache-config' into 'develop'
apache config: add instructions for mediaproxy. See merge request pleroma/pleroma!856
This commit is contained in:
commit
7daa9a8c42
|
@ -1,6 +1,7 @@
|
||||||
# default Apache site config for Pleroma
|
# default Apache site config for Pleroma
|
||||||
#
|
#
|
||||||
# needed modules: define headers proxy proxy_http proxy_wstunnel rewrite ssl
|
# needed modules: define headers proxy proxy_http proxy_wstunnel rewrite ssl
|
||||||
|
# optional modules: cache cache_disk
|
||||||
#
|
#
|
||||||
# Simple installation instructions:
|
# Simple installation instructions:
|
||||||
# 1. Install your TLS certificate, possibly using Let's Encrypt.
|
# 1. Install your TLS certificate, possibly using Let's Encrypt.
|
||||||
|
@ -8,6 +9,14 @@
|
||||||
# 3. This assumes a Debian style Apache config. Copy this file to
|
# 3. This assumes a Debian style Apache config. Copy this file to
|
||||||
# /etc/apache2/sites-available/ and then add a symlink to it in
|
# /etc/apache2/sites-available/ and then add a symlink to it in
|
||||||
# /etc/apache2/sites-enabled/ by running 'a2ensite pleroma-apache.conf', then restart Apache.
|
# /etc/apache2/sites-enabled/ by running 'a2ensite pleroma-apache.conf', then restart Apache.
|
||||||
|
#
|
||||||
|
# Optional: enable disk-based caching for the media proxy
|
||||||
|
# For details, see https://git.pleroma.social/pleroma/pleroma/wikis/How%20to%20activate%20mediaproxy
|
||||||
|
#
|
||||||
|
# 1. Create the directory listed below as the CacheRoot, and make sure
|
||||||
|
# the Apache user can write to it.
|
||||||
|
# 2. Configure Apache's htcacheclean to clean the directory periodically.
|
||||||
|
# 3. Run 'a2enmod cache cache_disk' and restart Apache.
|
||||||
|
|
||||||
Define servername example.tld
|
Define servername example.tld
|
||||||
|
|
||||||
|
@ -34,6 +43,15 @@ CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||||
SSLCompression off
|
SSLCompression off
|
||||||
SSLSessionTickets off
|
SSLSessionTickets off
|
||||||
|
|
||||||
|
# uncomment the following to enable mediaproxy caching on disk
|
||||||
|
# <IfModule mod_cache_disk.c>
|
||||||
|
# CacheRoot /var/cache/apache2/mod_cache_disk
|
||||||
|
# CacheDirLevels 1
|
||||||
|
# CacheDirLength 2
|
||||||
|
# CacheEnable disk /proxy
|
||||||
|
# CacheLock on
|
||||||
|
# </IfModule>
|
||||||
|
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
RewriteCond %{HTTP:Connection} Upgrade [NC]
|
RewriteCond %{HTTP:Connection} Upgrade [NC]
|
||||||
RewriteCond %{HTTP:Upgrade} websocket [NC]
|
RewriteCond %{HTTP:Upgrade} websocket [NC]
|
||||||
|
|
Loading…
Reference in New Issue