Fail to bring up apache server, after rebuilding a droplet

October 22, 2015 748 views
Apache Control Panels Debian

Few weeks ago, In order to save some space, I've empty some files from directory /var/lib/mysql (e.g. drupalbig@002dtoys2, drupalbigtoysdb), using the command
"filename < /dev/nulll" and later on I've deleted some log files, using the "rm" command.
As these actions did not save enough space, I've deleted (by mistake) the ibdata1
file that did save enough space for me, but at the same time caused a damage to
the functionality of my drupal site.
Fortunately, I had a backup of my droplet that has been created few hours ago, so I decided to rebuild the droplet from a snapshot that I created from the above backup.
Now when trying to bring up the apache server, I'm getting the following error:

root@faze:~# sudo service apache2 start
[....] Starting web server: apache2apache2: Could not reliably determine the server's fully qualif                                                                                                             ied domain name, using for ServerName
(98)Address already in use: make_sock: could not bind to address
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.

Did anybody experienced this situation, or can help with any idea to resolve the problem?

P.S. A VESTA control panel (VESTACP) is installed on my droplet.

1 Answer

The error Address already in use: make_sock: could not bind to address suggests that something else is already binding to port 80. Do you have another web server installed? Visting that IP address, I see an Nginx error page. It sounds like both Nginx and Apache are running and attempting to use port 80. By default, they will both start on boot.

To see if this is the issue, stop Nginx and start Apache with:

  • sudo service nginx stop
  • sudo service apache2 start

To disable Nginx from starting automatically, run:

  • sudo update-rc.d nginx disable
Have another answer? Share your knowledge.