From 291319e7953531bc818906d1f7a7e8c95b0b6ccd Mon Sep 17 00:00:00 2001 From: louis Date: Wed, 18 Dec 2024 13:29:20 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=9A=20Enable=20mod=5Frewrite=20and=20s?= =?UTF-8?q?implify=20Apache=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 7 ++++--- contrib/apache.conf | 29 +---------------------------- 2 files changed, 5 insertions(+), 31 deletions(-) diff --git a/Dockerfile b/Dockerfile index af457b4c..6c200478 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,9 +22,10 @@ RUN composer install --no-scripts && \ FROM docker.io/php:8.2-apache-bookworm RUN apt-get update && \ - apt-get install -y libpng-dev libsodium-dev libsqlite3-dev libzip-dev zlib1g-dev zip -RUN docker-php-ext-install -j$(nproc) gd opcache pdo_mysql pdo_sqlite sodium zip -RUN echo "memory_limit = 512M" > /usr/local/etc/php/conf.d/memory_limit.ini + apt-get install -y libpng-dev libsodium-dev libsqlite3-dev libzip-dev zlib1g-dev zip && \ + a2enmod rewrite && \ + docker-php-ext-install -j$(nproc) gd opcache pdo_mysql pdo_sqlite sodium zip && \ + echo "memory_limit = 512M" > /usr/local/etc/php/conf.d/memory_limit.ini COPY --from=builder /var/www/html /var/www/html COPY contrib/apache.conf /etc/apache2/sites-available/000-default.conf diff --git a/contrib/apache.conf b/contrib/apache.conf index 7341fb14..0e7372f1 100644 --- a/contrib/apache.conf +++ b/contrib/apache.conf @@ -1,36 +1,9 @@ - DocumentRoot /var/www/html/public - AllowOverride AuthConfig FileInfo Indexes Limit Options=ExecCGI,Includes,Indexes,SymLinksIfOwnerMatch,MultiViews - Options -Indexes -MultiViews +SymLinksIfOwnerMatch - - LimitRequestBody 10485760 - - - - - Require all granted + AllowOverride All SetEnv APP_ENV dev - - - AddHandler fcgid-script .php - FCGIWrapper /var/www/users.example.org/php-fcgi/php-fcgi-starter .php - - IPCConnectTimeout 20 - IPCCommTimeout 60 - FcgidBusyTimeout 60 - MaxRequestLen 10485760 - - - Options +ExecCGI - - - - ErrorLog "|/usr/bin/logger -t apache -p local0.error" - - Protocols h2 http/1.1