Apache in an AWS Instance not starting

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

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

1

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.

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like