I unable to restart Apache

[IMPORTANT, please fill the questions]

Application name and version:
Wordpress. The latest version
Is it an installer, cloud image or virtual machine?:
AWS
Operative system/Platform (Linux, Windows, OSX)(x86/x64):
OSX
Was it installed as the root user?
Is there anything you’ve done and/or tried with the application before posting here?
E.g. changed permissions or installed a plugin:

I tried to restart apache and got this message:
bitnami@ip-172-31-55-232:/opt/bitnami/mysql/bin$ sudo /opt/bitnami/ctlscript.sh restart apache
Unmonitored apache
Syntax OK
/opt/bitnami/apache2/scripts/ctl.sh : apache not running
Syntax OK
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
/opt/bitnami/apache2/scripts/ctl.sh : httpd could not be started
Monitored apache

After that I used this command:
netstat -lnp | grep :80

And i got next message:
tcp6 0 0 :::80 :::* LISTEN 2439/httpd.bin

I’m very newby in server side. Could somebody helps?

1 Like

Hello @aduxmedia,

It seems there is a service using this port. You could kill it by executing:

 sudo kill -9 $(sudo lsof -t -i:80)

Then, try to start Apache again.

I hope it helps.

6 Likes

Hi davldg,
Thank you for answer.
What i did:
bitnami@ip-172-31-55-232:~$ sudo kill -9 $(sudo lsof -t -i:80)
bitnami@ip-172-31-55-232:~$ sudo /opt/bitnami/ctlscript.sh restart apache
Unmonitored apache
Syntax OK
/opt/bitnami/apache2/scripts/ctl.sh : apache not running
Syntax OK
/opt/bitnami/apache2/scripts/ctl.sh : httpd started at port 80
Monitored apache
bitnami@ip-172-31-55-232:~$ sudo /opt/bitnami/ctlscript.sh restart apache
Unmonitored apache
Syntax OK
/opt/bitnami/apache2/scripts/ctl.sh : httpd stopped
Syntax OK
/opt/bitnami/apache2/scripts/ctl.sh : httpd started at port 80
Monitored apache

Is it okay?

Yes, the server is running properly now.

Regards

Thank you, davldg! Good news!

What do you think about MySQL problem?

after 3 hours of googling i found your post

THANKS A MILLION !!!

3 Likes

Hi. I tried to install SSL and I have a problem restarting Apache.
It says unmonitored Apache: syntax error on line 38. Can anyone help me on what to do? I’m new to this. Thanks a lot

Hi @Wanderlass,

Apache is not restarted when the syntax is not correct. In this case, it found a syntax error on line 38 (not sure what file, but probably it was modified recently). It could give you some clues.

We have a Support Tool that will gather relevant information for us to debug the issue. Could you please download and execute it on the machine where the stack is running by following the steps described in the guide below?

How to Run the Bitnami Support Tool

Please note that you need to paste the code outputted by the tool in your reply.

Thank You so much davidg, apache started and site is working fine.

THANK YOU! as well for me… hours of trying, finally find your post, so lucky. Thanks a lot davidg

1 Like

please help me to fix the issue

code : 0123036f-e2da-0906-feeb-ad3f18cf1b12

Hello @farsanasaleh2280,

Apache seem to be running. You could check it by executing:

sudo /opt/bitnami/ctlscript.sh status

Regards

I have removed the VM machine then installed all from scratch

Thanks dear for the reply