Fail to bring up apache server, after rebuilding a droplet

Posted October 22, 2015 4.6k views
ApacheDebianControl Panels

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.

edited by asb

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
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