Nextcloud Redirect

Here are a couple ways to redirect https://my.domain.com/Nextcloud/ to https://my.domain.com/

<?php
header("Location: nextcloud");
?>

It just redirects the browser to the nextcloud folder,simple and easy.

Your nextcloud.conf vhost file, try this (within VirtualHost tags):

DocumentRoot /var/www/nextcloud
ServerName my.domain.com

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

    <IfModule mod_dav.c>
        Dav off
    </IfModule>

    SetEnv HOME /var/www/nextcloud
    SetEnv HTTP_HOME /var/www/nextcloud

</Directory>

Then restart apache

$ sudo service apache2 restart

Try getting to it via the https://my.domain.com/

Leave a Reply