From 706c0679196f8ff18ea63a3c8e3dd8a247dee939 Mon Sep 17 00:00:00 2001 From: Vincent BRIDIER Date: Mon, 6 Oct 2025 19:27:44 +0200 Subject: [PATCH] fix: Fix .htaccess rights --- Dockerfile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2ea300d..2191bee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,10 +2,9 @@ FROM matomo:5.4.0-apache RUN a2enmod rewrite +RUN chown -R www-data:www-data /var/log/apache2 && \ + setcap 'cap_net_bind_service=+ep' /usr/sbin/apache2 USER www-data -# Create .htaccess file with rewrite rules -RUN echo 'RewriteEngine On' > /var/www/html/.htaccess && \ - echo 'RewriteRule ^unicorn$ matomo.js [L]' >> /var/www/html/.htaccess && \ - echo 'RewriteRule ^rainbow$ matomo.php [L]' >> /var/www/html/.htaccess -USER root \ No newline at end of file + +RUN printf "RewriteEngine On\nRewriteRule ^unicorn$ matomo.js [L]\nRewriteRule ^rainbow$ matomo.php [L]\n" > /var/www/html/.htaccess \ No newline at end of file