Question

Issues with apache2 restart

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.

Subscribe
Share

systemctl status apache2.service ● apache2.service - The Apache HTTP Server Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: Drop-In: /lib/systemd/system/apache2.service.d └─apache2-systemd.conf Active: failed (Result: exit-code) since Tue 2019-04-02 17:04:59 IST; 2min 53 Process: 14228 ExecStop=/usr/sbin/apachectl stop (code=exited, status=1/FAILUR Process: 14612 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAIL Main PID: 14046 (code=exited, status=0/SUCCESS)

Apr 02 17:04:58 sa-ThinkCentre-M72e systemd[1]: Starting The Apache HTTP Server. Apr 02 17:04:58 sa-ThinkCentre-M72e apachectl[14612]: apache2: Syntax error on l Apr 02 17:04:58 sa-ThinkCentre-M72e apachectl[14612]: Action ‘start’ failed. Apr 02 17:04:58 sa-ThinkCentre-M72e apachectl[14612]: The Apache error log may h Apr 02 17:04:59 sa-ThinkCentre-M72e systemd[1]: apache2.service: Control process Apr 02 17:04:59 sa-ThinkCentre-M72e systemd[1]: apache2.service: Failed with res Apr 02 17:04:59 sa-ThinkCentre-M72e systemd[1]: Failed to start The Apache HTTP

what is the remedy for this problem? i can’t restart the apache2 in system

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…

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.

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


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

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

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