diff options
author | link0ff <juri@linkov.net> | 2019-03-03 18:29:37 +0200 |
---|---|---|
committer | link0ff <juri@linkov.net> | 2019-03-03 18:29:37 +0200 |
commit | 19e2b852473ea4d371fb3d77e9344025e0499428 (patch) | |
tree | dcd43e823f7687767651e6eb0877b5b4aca53882 /installation/pleroma-apache.conf | |
parent | e278d470232f4e8081bbbe358137400074673e75 (diff) | |
parent | ace4231628ad1af08c8696fb7fe6983549f62631 (diff) | |
download | pleroma-19e2b852473ea4d371fb3d77e9344025e0499428.tar.gz pleroma-19e2b852473ea4d371fb3d77e9344025e0499428.zip |
Merge remote-tracking branch 'upstream/develop' into feature/openldap-support
Diffstat (limited to 'installation/pleroma-apache.conf')
-rw-r--r-- | installation/pleroma-apache.conf | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/installation/pleroma-apache.conf b/installation/pleroma-apache.conf index d5e75044f..2beb7c4cc 100644 --- a/installation/pleroma-apache.conf +++ b/installation/pleroma-apache.conf @@ -1,6 +1,7 @@ # default Apache site config for Pleroma # # needed modules: define headers proxy proxy_http proxy_wstunnel rewrite ssl +# optional modules: cache cache_disk # # Simple installation instructions: # 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 # /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. +# +# 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 @@ -34,6 +43,15 @@ CustomLog ${APACHE_LOG_DIR}/access.log combined SSLCompression 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 RewriteCond %{HTTP:Connection} Upgrade [NC] RewriteCond %{HTTP:Upgrade} websocket [NC] |