Situation analysis
From your log:
Address already in use: AH00072: make_sock: could not bind to address [::]:80
Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
A collision concerning your TCP port 80 occured. There are two possible reasons of problem in your server:
- Some application or service on background use the same port TCP 80 as the Apache wishes to use.
- Wrong port+address / socket setting is in your Apache config. It is less probable reason than #1.
Solution
Install the net-tools and use netstat to get information what process/application occupies TCP 80 in your system.
sudo apt-get install net-tools
sudo netstat -lntp | grep -e ":80" -e "PID"
Now you see the process number and application name which uses port 80. Disable this application or change application setting to use another port than TCP 80.
Detail process listings usable for searching details about application which is listening on your TCP port:
ps -ef
ps -aux
Search for the process number got from netstat
output.
Extended answer after new information in comment
According to your response it looks you have the 2 instances of Apache in collision.
Reboot your server. In "fresh" system use these commands and paste their outputs here to your question.
sudo sudo service --status-all | grep -i apache
sudo systemctl --type service --all | grep -i apache
sudo ps -ef | grep -i apache
sudo ps -aux | grep -i apache
ls -l /etc/apache2/sites-enabled
grep -R "80" /etc/apache2
Edit
(after new data were pasted by InsertRandomString in response to my request)
You already have an Apache instance running and listening on your system. The running Apache service is displayed in new outputs you have attached. There is no need to install any new web server (Apache, Nginx...). Do not install it, but use what is already available.
Verify the Apache functionality by web browser. Put your server IP address into address field of web browser and press Enter. You will see default Apache page confirming server is OK. For instance http://192.168.1.25
Your web server is capable to publish more virtual sites in separate domains simultaneously. Each of them must have its own file in the /etc/apache2/sites-available
directory and in /etc/apache2/sites-enabled
too. In /etc/sapache2/sites-enabled
are only symbolic links of enabled sites.
Do you plan to use more domains and more virtual sites on your server?
- If yes, create new file for the Nextcloud site in
/etc/apache2/sites-available
and link it to /etc/apache2/sites-enabled
. You need special domain for Nextcloud site and a DNS record must be set too.
- If no, edit the default site parameters in the
/etc/apache2/sites-available/000-default.conf
file and set correct values like the name of directory containing all your Nextcloud PHP files etc. It is not necessary (but is possible) to have special domain. The IP address is enough to display your Nextcloud site.
I suppose you know how to set Apache configuration files to publish the Nextcloud site e.g. /var/www/nextcloud
instead of default page /var/www/html
.
In case you intend use your Nextcloud with public IP address, then it is absolutely necessary to configure SSL, certificates and enable secure HTTPS access too. Otherwise your Nextcloud user names and passwords can be captured and compromised.
My personal note
The Nextcloud is not so simple as it looks. Many PHP modules must be installed, the MySQL database prepared etc. But I very like this service, it is my preferred tool for the data sharing and synchronizing on multiple devices.