fix: enable mod_rewrite, AllowOverride All, and ServerName in Dockerfile
This commit is contained in:
+5
-1
@@ -1,7 +1,11 @@
|
|||||||
FROM php:8.2-apache
|
FROM php:8.2-apache
|
||||||
|
|
||||||
RUN docker-php-ext-install pdo pdo_mysql \
|
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
|
WORKDIR /var/www/html
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user