1

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 restart

It 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 logs

Edit: 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.)

0
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..

  • not sure, the domain is pointed at the static ip. its the same ip for the new instance. I'm not sure about nginx, i just created an instance of the snapshot from my other instance that I attempted to upgrade. – peter-cs Feb 25 at 12:45
0

You can check which process is listening at the port 80 using the command netstat:

sudo netstat -tlpn | grep :80

In my case, it’s apache2.

tcp        0      0 0.0.0.0:80         0.0.0.0:*         LISTEN      11164/apache2

If 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.

  • I did what you suggested this what I got. tcp6 0 0 :::80 :::* LISTEN 1491/apache2 – peter-cs Feb 25 at 12:48
  • It means Apache is running and waiting for IPv6 connections. Could you edit your question with details on how you tried to restart Apache (exact command)? – Melebius Feb 25 at 13:00
  • edited my question, I used ~S sudo apachectl restart – peter-cs Feb 25 at 23:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.