I am too still seeing the default apache2 page. I follow the guide to the letter, except for the let’sencrypts that I fixed later. Removing the other configs is not a good idea because then nothing works:
david@cloud:/etc/apache2/sites-available$ ls
000-default.conf default-ssl.conf nextcloud.conf
david@cloud:/etc/apache2/sites-available$ sudo mv default-ssl.conf default-ssl.conf.bak
david@cloud:/etc/apache2/sites-available$ sudo mv 000-default.conf 000-default.conf.bak
david@cloud:/etc/apache2/sites-available$ ls
000-default.conf.bak default-ssl.conf.bak nextcloud.conf
david@cloud:/etc/apache2/sites-available$ sudo systemctl restart apache2
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
And nothing gets displayed.
Apparently, the way you described to obtain the certificate is deprecated. I followed this instead:
How to get certificate with Letsencrypt using DNS to verify domain
The only way I could see it working was by adding the lines for the cert to the default-ssl.conf too because that’s the only one that gets served now.
Could you help me?
EDIT: solved, see below. Thanks
david@cloud:/etc/apache2/sites-available$ sudo a2ensite nextcloud.conf
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_GB.UTF-8"
are supported and installed on your system.
perl: warning: [as above]
Site 000-default disabled.
To activate the new configuration, you need to run:
systemctl reload apache2
david@cloud:/etc/apache2/sites-available$ sudo a2dissite default-ssl.conf
perl: warning: [as above]
Site default-ssl disabled.
To activate the new configuration, you need to run:
systemctl reload apache2
david@cloud:/etc/apache2/sites-available$ sudo service apache2 reload
To fix locales:
sudo apt install locales
sudo /usr/sbin/dpkg-reconfigure locales