I use docker compose. However, when I run \"docker-compose up\", I came across an error : /var/www/html/.htaccess: Invalid command \'RewriteEngine\'.
Can you tell me
This works for me:
# Dockerfile
FROM php:5.6-apache
MAINTAINER Raphael Mäder
RUN a2enmod rewrite
ADD . /var/www/html
Don't forget to run your docker-compose up
command with --build
if you have already built the image previously, otherwise it will run the old image which may have not included the RUN a2enmod rewrite
statement.