On Debian, Ubuntu, and their derivatives, Apache installs with a useful configuration so all you have to do is create a /etc/apache2/sites-available/nextcloud.conf file with these lines in it, replacing the Directory and other filepaths with your own filepaths:
Alias /nextcloud “/var/www/nextcloud/” <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>
Yes at best set up a new file in /etc/apache2/sites-available/nextcloud.conf and a2ensite it. In that file you put all your configuration, including the statements suggested in the documentation. You might even add a VirtualHost that does a redirection from http to https.
You might need to a2dissite your default config after that, and restart apache.
You also might need to move your nextcloud directory from /var/www/html to /var/www/nextcloud and adjust the path in your config.
I am preparing for manual installation.
As of “https://linuxize.com/post/how-to-install-apache-on-debian-10/” it is highly recommended to follow the standard naming convention for Apache Configuration File’s such as e.g. “…-available/sld.tld.conf”. This is opposing to NC Installation guide where a file named “nextcloud.conf” is suggested to use (or will be set up when installing manually, don’t know). Am i running into troubles when i’m using recommended standard.
I recognized "eehmke"s reply here. Is this always valuable? I’m actually confused and don’t know what to do