How can i get rid of /nextcloud in the URL?

Hi,
i have a running nc with a valid domain and a certificate.
https://my-hostname.my-domain.tld
But i need https://my-hostname.my-domain.tld/nextcloud to access my nc.
If i omit nextcloud i get the status page from Ubuntu Apache2.
Is there a way to get rid of /nextcloud in the URL and still accessing it ?
I’m not an apache expert, and the rewrite rules in nextcloud/.htaccess really frighten me a bit.
Especially because of the hint “#### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####” in the .htaccess file.

Thanks.

Bernd

You probably keep your nextcloud files in a ‘nextcloud’ directory within your root directory of your webserver. You would have to move them to all files inside this directory directly to the root directory to get rid of /nextcloud. If you do this, check your config/config.php if all paths are pointing to the new directory :+1:

e.g. from /var/www/html/nextcloud to /var/www/html

I wouldn’t bother moving the files; just make an easy tweak to your web server configuration.

Did you create an apache config file for your site, complete with the ServerName directive, or are you just using the apache default site config files? Either way, edit the DocumentRoot setting and append /nextcloud to the line.

# Your current line probably looks like this...
DocumentRoot /var/www/html

# Change to the following:
DocumentRoot /var/www/html/nextcloud/

Official NC docs on Apache config are here.