From e103bef84ccf3f5bb7a4d6d83354748e61c9d0c7 Mon Sep 17 00:00:00 2001 From: Max Nuding Date: Tue, 20 Jun 2023 15:45:09 +0200 Subject: [PATCH] Fix #33 --- README.md | 2 ++ apache2.conf.EXAMPLE | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/README.md b/README.md index 7de44c9..dede4f9 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,8 @@ Copy `apache2.conf.EXAMPLE` to `/etc/apache2/sites-available/moshingmammut.conf` Domain. If you do not need or want SSL support, remove the whole `` block. If you do, add the path to your SSLCertificateFile and SSLCertificateKeyFile. +Modify DocumentRoot and the two Alias and Directory statements, so that thumbnails and avatars are served directly by apache. + Copy `moshing-mammut.service.EXAMPLE` to `/etc/systemd/system/moshing-mammut.service` and set your `User`, `Group`, `ExecStart` and `WorkingDirectory` accordingly. diff --git a/apache2.conf.EXAMPLE b/apache2.conf.EXAMPLE index 93fabdf..932d1eb 100644 --- a/apache2.conf.EXAMPLE +++ b/apache2.conf.EXAMPLE @@ -15,6 +15,23 @@ Include /etc/letsencrypt/options-ssl-apache.conf + DocumentRoot /home/moshing-mammut/app/ + + ProxyPass /avatars/ ! + ProxyPass /thumbnails/ ! + Alias /avatars/ /home/moshing-mammut/app/avatars/ + Alias /thumbnails/ /home/moshing-mammut/app/thumbnails/ + + + Require all granted + Header set Cache-Control "public,max-age=31536000,immutable" + + + + Require all granted + Header set Cache-Control "public,max-age=31536000,immutable" + + ProxyPass / http://localhost:3000/ ProxyPassReverse / http://localhost:3000/