Configure index.php-less URLs


If you want URLs without the trailing "index.php", e.g., instead of, you can enable it by following these steps:


Log in to the Docker container running ownCloud, and execute the following command on the host system of the appliance:

univention-app shell owncloud

Your web server needs to have the following modules enabled: mod_rewrite and mod_env. If you have not yet enabled these modules, or are not sure if you have, execute these commands:

a2enmod env rewrite

You need an owncloud.conf in your /etc/apache2/sites-available/ directory.

Open /etc/apache2/sites-available/owncloud.conf in nano, Vim, or your editor of choice, and paste the following:

Alias /owncloud "/var/www/owncloud/"

<Directory /var/www/owncloud/>
  Options +FollowSymlinks
  AllowOverride All

 <IfModule mod_dav.c>
  Dav off

 SetEnv HOME /var/www/owncloud
 SetEnv HTTP_HOME /var/www/owncloud


Then create a symlink to /etc/apache2/sites-enabled, as follows:

ln -s /etc/apache2/sites-available/owncloud.conf /etc/apache2/sites-enabled/owncloud.conf

Enable index.php-less URLs

Adjust your config.php to look like the following:

'overwrite.cli.url' => '',
'htaccess.RewriteBase' => '/owncloud',

Execute the command:

sudo -u www-data ./occ maintenance:update:htaccess

Restart or reload your Apache server, by running the following command:

service apache2 reload

Now you should have index.php-less URLs.