nextcloud-nonroot

Beautiful URLs

  1. Edit your config file in your container nano /var/www/html/config/config.php then add 'htaccess.RewriteBase' => '/',

  2. Create init script : you can can create a folder mkdir scripts and in it add the following file nano scripts/htaccess-script.sh :

#!/bin/bash
cd /var/www/html && php occ maintenance:update:htaccess
  1. Mount it inside the container initscripts folder : in your docker compose, in the section volumes
- ./scripts:/docker-entrypoint-init.d
  1. Don't forget to set correct permissions on the config folder chown -R 1420 config

  2. Restart : docker-compose up -d