Remove Nextcloud from root dir
I successfully installed Nextcloud on my domain example.com, and now it is available on nextcloud.example.com. The problem is that is also available on example.com. Can I remove it from there and host something else there?
Change your web server configuration to eliminate the 2nd url. Since you don’t say what web server you use or show your configuration, that exercise is left to you.
How can I obtain that info? I am using NextCloud from the marketplace. All I know it is a Debian 10 machine.
- Connect with ssh(1)
ps -ef | grep apache2
If you get info back from this, you're running apache2(8). If not, you're running some other web server.
For apache2(8), the configuration is kept in /etc/apache2/sites-enabled… Look for a file with the phrase nextcloud in it or
grep -l cloud /etc/apache2/sites-enabled/*. If you get something back, edit that file. Once you get done editing, save the file and restart apache2(8) (
sudo systemctl restart apache2). You're probably going to have to do some of this with sudo. If you made any mistakes, you'll get errors from
systemctl telling you that the restart failed (but it won't tell you why).
You can check the syntax of your apache2(8) configuration with
sudo apache2ctl configtest. It would be a good idea to do this however many times you need before attempting a restart with
systemctl fails, your web server will be down.
If you're running some other web server (e.g., nginx, Litespeed, etc), you're on your own. I don't have a clue where the others keep their configuration. Maybe someone else has information about that…