fix: enable AllowOverride All in Dockerfile to activate .htaccess settings

This commit is contained in:
mstfyldz
2026-05-04 23:49:11 +03:00
parent 1a1fa50daa
commit 92a2be6f35

View File

@@ -1,15 +1,17 @@
FROM php:8.2-apache FROM php:8.2-apache
# Apache modüllerini aktif et (Rewrite, Expires, Sıkıştırma için) # Apache modüllerini aktif et
RUN a2enmod rewrite expires deflate headers RUN a2enmod rewrite expires deflate headers
# .htaccess dosyalarının çalışması için AllowOverride izni ver
RUN sed -i 's/AllowOverride None/AllowOverride All/g' /etc/apache2/apache2.conf
# Proje dosyalarını kopyala # Proje dosyalarını kopyala
COPY . /var/www/html/ COPY . /var/www/html/
# İzinleri ayarla # İzinleri ayarla
RUN chown -R www-data:www-data /var/www/html/ RUN chown -R www-data:www-data /var/www/html/
# Çalışma dizini
WORKDIR /var/www/html WORKDIR /var/www/html
EXPOSE 80 EXPOSE 80