Caching and compression conf

From: https://github.com/spotweb/spotweb/wiki/Performance-tips

Builds OK, caching works, compression is defaulted to 6 in zlib, didn’t notice huge spike in load.

Signed-off-by: James Stout <stoutyhk@gmail.com>
This commit is contained in:
James Stout
2020-03-27 20:28:20 +08:00
parent c6737d23fd
commit 3081a583ed
3 changed files with 47 additions and 2 deletions

View File

@@ -54,7 +54,15 @@ fi
# Clean up apache pid (if there is one)
rm -rf /run/apache2/apache2.pid
# Enabling PHP mod rewrite
/usr/sbin/a2enmod rewrite && /etc/init.d/apache2 restart
# Enabling PHP mod rewrite, expires and deflate (they may be on already by default)
unset rt
/usr/sbin/a2enmod rewrite && rt=1
/usr/sbin/a2enmod expires && rt=1
/usr/sbin/a2enmod deflate && rt=1
# Only restart if one of the enmod commands succeeded
if [[ -n $rt ]]; then
/etc/init.d/apache2 restart
fi
tail -F /var/log/apache2/* /dev/stdout /dev/stderr