Reach Nextcloud directly

I’ve installed Nextcloud 13.0.4 on Ubuntu Server 18.04 with Apache 2.4.29.
I took a domain name from like [hostname]
Now I can reach Nextcloud from https://[hostname]

How can I reach Nextcloud simply with https://[hostname]

I think you set the wrong Root Directory. You will find the conf in /etc/apache2/sites-available/.
Don’t forget to restart apache after editing the conf with sudo service apache2 restart.

Hi @Django3,
Thanks for your response.
This is the content of /etc/apache2/sites-available/nextcloud.conf:

Alias /nextcloud “/var/www/nextcloud/”

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

Dav off

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

<VirtualHost *:80>
ServerName [hostname]
Redirect permanent / https://[hostname]
RewriteEngine on
RewriteCond %{SERVER_NAME} =[hostname]
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

<VirtualHost *:443>
ServerName [hostname]
Protocols h2

Header always set Strict-Transport-Security “max-age=15552000; includeSubDomains; preload”

Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/[hostname]
SSLCertificateKeyFile /etc/letsencrypt/live/[hostname]

How do I have to edit it? I’m not an expert unfortunately :sweat_smile:

Try to remove it and check your root directory in the default virtual.conf in
or default-ssl.conf.

After that restart apache2