-
Edit your config file in your container
nano /var/www/html/config/config.php
then add'htaccess.RewriteBase' => '/',
-
Create init script : you can can create a folder
mkdir scripts
and in it add the following filenano scripts/htaccess-script.sh
:
#!/bin/bash
cd /var/www/html && php occ maintenance:update:htaccess
- Mount it inside the container initscripts folder : in your docker compose, in the section volumes
- ./scripts:/docker-entrypoint-init.d
-
Don't forget to set correct permissions on the config folder
chown -R 1420 config
-
Restart :
docker-compose up -d