I had an instance with AWS, decided to upgrade the plan of that instance and now my instance is not working properly with 2 sites that I had.
I detached the static IP from the old instance and put it on the new instance. It should be working fine? Unfortunately, it’s not.
The static IP address used to give me the default Bitnami congratulation page. But now it gives me Apache2 Ubuntu Default Page.
I use this command to attempt to restart apache2:
~$ sudo apachectl restartIt gave me this error message:
httpd not running, trying to start
(98)Address already in use: AH00073: make_sock: unable to listen for connections on address [::]:80
(98)Address already in use: AH00073: make_sock: unable to listen for connections on address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logsEdit: Also the domain name I had pointed to this static IP address is not resolving. (The static IP is pointed to the new instances already.)
2 Answers
service nginx stop and try now. I am guessing that you have installed the nginx which is using the port 80 and that is why the apache cannot work.
As for the domain you have to point this to the new IP..
1You can check which process is listening at the port 80 using the command netstat:
sudo netstat -tlpn | grep :80In my case, it’s apache2.
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 11164/apache2If you find a different process is using it (such as nginx as suggested by another answer), stop the process using the command kill <PID> or service <name> stop.