zothen
By:
zothen

Issues with apache2 restart

August 21, 2016 13.1k views
Apache Ubuntu

I have followed the phpMyAdmin tutorial, and have experienced an issue.

I have given the following command:
sudo service apache2 restart

I have received the following response:
Job for apache2 service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.

Upon using systemctl status apache2.service, I see the following text:
[reddot] apache2.service - LSB: Apache2 web server
Loaded: loaded (etc/init.d/apache2; bad vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
¬apache2-systemd.conf
Active: failed (Result: exit-code) since Sun 2016-08-21 [TIME]; 18s ago
Docs: man:systemd-sysv-generator(8)
Process: 19827 ExecStop=etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
Process: 16438 ExecReload=/et/init.d/apache2 stop reload (code=exited, status=0/SUCCESS)
Process: 19919 ExecStat=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

Doing "journalctl -xe" give a large amount of information, with no obvious issues visible.

3 comments
  • Which version of Ubuntu are you using?
    Which phpMyAdamin tutorial?

    There might be some more things you need to install. I had some issues with phpMyadmin on 16.04, and had to do the following:

    sudo apt install php7.0-mbstring php-gettext libapache2-mod-php

  • Thanks for your reply. I am using Ubuntu 16.04.

    This is the tutorial I am using:
    https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-ubuntu-12-04

    I checked whether the IP led to a valid web page twice during the tutorial, and everything was working correctly. An issue occured by the time I arrived at the last stage, however.

    I used the command you reccomended, and there was a message saying, in short, that I am already using the latest version of php, and the previous error was replicated when I attempted to restart apache2.

    by Etel Sverdlov
    This tutorial covers installing phpMyAdmin on a LAMP stack. Additionally it includes the steps on how to secure it with the .htaccess file. phpMyAdmin is an free web software to work with MySQL on the web—it provides a convenient visual front end to the MySQL capabilities.
  • I think that tutorial might be out of date for 16.04.

    Try removing that line from apache.conf:

    sudo nano /etc/apache2/apache2.conf

    remove this line:
    Include /etc/phpmyadmin/apache.conf

    restart apache..

2 Answers

This question was answered by @sierracircle:

I think that tutorial might be out of date for 16.04.

Try removing that line from apache.conf:

sudo nano /etc/apache2/apache2.conf

remove this line:
Include /etc/phpmyadmin/apache.conf

restart apache..

View the original comment

I'm running into this exact issue and the suggestion of removing 'Include /etc/phpmyadmin/apache.conf' from /etc/apache2/apache2.conf does nothing

Have another answer? Share your knowledge.