Fix Coolify bad gateway by aligning Apache port to 3000

This commit is contained in:
mstfyldz
2026-02-22 17:13:00 +03:00
parent b44389a0a2
commit a8a4777a72

View File

@@ -7,8 +7,10 @@ COPY . /var/www/html/
RUN chown -R www-data:www-data /var/www/html \
&& chmod -R 755 /var/www/html
# Apache'nin PHP'yi işlemesini sağla ve AllowOverride ayarını aktifleştir
# Apache Portunu 3000 yap (Coolify Varsayılanı)
# ve yalnızca /var/www/ dizini için AllowOverride'i All yap
RUN a2enmod rewrite \
&& sed -i 's/AllowOverride None/AllowOverride All/g' /etc/apache2/apache2.conf
&& sed -i 's/80/3000/g' /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf \
&& sed -i '/<Directory \/var\/www\/>/,/<\/Directory>/ s/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf
EXPOSE 80
EXPOSE 3000