Use /var/tmp for media cache path in apache/nginx configs

The /var/tmp directory is not mounted as tmpfs unlike /tmp which is
mounted as such on some distros like Fedora or Arch. Since there isn't
really a benefit to having the cache on tmpfs, this change should allow
for a larger cache if needed without worrying about running out of RAM.
This commit is contained in:
Norm 2024-05-15 16:58:58 -04:00
parent 76ded10a70
commit 7e709768c3
4 changed files with 4 additions and 4 deletions

View file

@ -60,7 +60,7 @@ ServerTokens Prod
Include /etc/letsencrypt/options-ssl-apache.conf
# Uncomment the following to enable MediaProxy caching on disk
#CacheRoot /tmp/akkoma-media-cache/
#CacheRoot /var/tmp/akkoma-media-cache/
#CacheDirLevels 1
#CacheDirLength 2
#CacheEnable disk /proxy

View file

@ -16,7 +16,7 @@
SCRIPTNAME=${0##*/}
# mod_disk_cache directory
CACHE_DIRECTORY="/tmp/akkoma-media-cache"
CACHE_DIRECTORY="/var/tmp/akkoma-media-cache"
## Removes an item via the htcacheclean utility
## $1 - the filename, can be a pattern .

View file

@ -3,7 +3,7 @@
# See the documentation at docs.akkoma.dev for your particular distro/OS for
# installation instructions.
proxy_cache_path /tmp/akkoma-media-cache levels=1:2 keys_zone=akkoma_media_cache:10m max_size=1g
proxy_cache_path /var/tmp/akkoma-media-cache levels=1:2 keys_zone=akkoma_media_cache:10m max_size=1g
inactive=720m use_temp_path=off;
# this is explicitly IPv4 since Pleroma.Web.Endpoint binds on IPv4 only

View file

@ -5,7 +5,7 @@
SCRIPTNAME=${0##*/}
# NGINX cache directory
CACHE_DIRECTORY="/tmp/akkoma-media-cache"
CACHE_DIRECTORY="/var/tmp/akkoma-media-cache"
## Return the files where the items are cached.
## $1 - the filename, can be a pattern .