Nextcloud sub path domain

I installed nextcloud in the /var/www/html/nextcloud folder using the following tutorial:

Now every time I access my it redirects me to How do I leave empty to be added to another website? My server is ubuntu 17 running apache

You can install it in
/var/www/html instead of /var/www/html/nextcloud

It’s this line in your configuration you have to change from:

DocumentRoot /var/www/html/nextcloud/


DocumentRoot /var/www/html/

I made this change, now at it gives the following error:

Internal Server Error
The server encountered an internal error and was unable to complete your request.

Please contact your server administrator if this error reappears multiple times, please include the technical details below in your report.

More details can be found in the server log.

So, what does the server log say?

If you follow that tutorial by blindly copy those config files, it is time you read a bit about what you had pasted. Focus on lines that involve /var/www/html <-> /var/www/html/nextcloud should be enough.

One more step ahead, for letsencrypt to auto renew, you need to update the conf file in /etc/letsencrypt/renewal/ for the same “path issue” as well.