fix: enable mod_rewrite, AllowOverride All, and ServerName in Dockerfile

This commit is contained in:
TigerStable
2026-06-12 22:02:14 +07:00
parent b0b94ecec3
commit a87a5ab1a9
+5 -1
View File
@@ -1,7 +1,11 @@
FROM php:8.2-apache
RUN docker-php-ext-install pdo pdo_mysql \
&& a2enmod headers
&& a2enmod headers rewrite
# Allow .htaccess overrides and enable rewrite for all directories
RUN sed -i 's|AllowOverride None|AllowOverride All|g' /etc/apache2/apache2.conf \
&& echo "ServerName localhost" >> /etc/apache2/apache2.conf
WORKDIR /var/www/html