apache2 not able to restart in Ubuntu 16.04
I installed apache2 on my Ubuntu machine, at first, it was working fine as I started and restarted many times in the course. But now suddenly when I tried to restart it gave me the error message as:
[....] Restarting apache2 (via systemctl): apache2.serviceJob for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
When checked systemctl status apache2.service
it gave me the folllowing message:
● 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 Mon 2017-06-12 05:49:53 IST; 16s ago
Docs: man:systemd-sysv-generator(8)
Process: 9478 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: *
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: * The apache2 configtest failed.
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: Output of config test was:
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 2 of /et
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: Action 'configtest' failed.
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: The Apache error log may have more information.
Jun 12 05:49:53 yathartha-inspiron systemd[1]: apache2.service: Control process exited, code=exited status=1
Jun 12 05:49:53 yathartha-inspiron systemd[1]: Failed to start LSB: Apache2 web server.
Jun 12 05:49:53 yathartha-inspiron systemd[1]: apache2.service: Unit entered failed state.
Jun 12 05:49:53 yathartha-inspiron systemd[1]: apache2.service: Failed with result 'exit-code'.
What journalctl -u apache2
showed:
Jun 12 05:47:21 yathartha-inspiron systemd[1]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The system clock has been changed to REALTIME microseconds after January 1st, 1970.
Jun 12 05:47:21 yathartha-inspiron systemd[1]: snapd.refresh.timer: Adding 5h 39min 46.253658s random time.
Jun 12 05:47:21 yathartha-inspiron systemd[1]: apt-daily.timer: Adding 1h 20min 25.260017s random time.
Jun 12 05:49:53 yathartha-inspiron sudo[9466]: yathartha : TTY=pts/1 ; PWD=/home/yathartha ; USER=root ; COMMAND=/etc/init.d/apache2 restart
Jun 12 05:49:53 yathartha-inspiron sudo[9466]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jun 12 05:49:53 yathartha-inspiron systemd[1]: Stopped LSB: Apache2 web server.
-- Subject: Unit apache2.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has finished shutting down.
Jun 12 05:49:53 yathartha-inspiron systemd[1]: Starting LSB: Apache2 web server...
-- Subject: Unit apache2.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has begun starting up.
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: * Starting Apache httpd web server apache2
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: *
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: * The apache2 configtest failed.
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: Output of config test was:
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 2 of /et
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: Action 'configtest' failed.
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: The Apache error log may have more information.
Jun 12 05:49:53 yathartha-inspiron systemd[1]: apache2.service: Control process exited, code=exited status=1
Jun 12 05:49:53 yathartha-inspiron systemd[1]: Failed to start LSB: Apache2 web server.
-- Subject: Unit apache2.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has failed.
--
-- The result is failed.
Jun 12 05:49:53 yathartha-inspiron systemd[1]: apache2.service: Unit entered failed state.
Jun 12 05:49:53 yathartha-inspiron systemd[1]: apache2.service: Failed with result 'exit-code'.
Jun 12 05:49:53 yathartha-inspiron sudo[9466]: pam_unix(sudo:session): session closed for user root
Jun 12 05:51:28 yathartha-inspiron org.gnome.evolution.dataserver.Sources5[1582]: ** (evolution-source-registry:1869): WARNING **: secret_servi
lines 1602-1643/1643 (END)
I am not able to figure out what might be the error can anyone please help me out.
16.04 server apache2 php
bumped to the homepage by Community♦ 2 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
|
show 4 more comments
I installed apache2 on my Ubuntu machine, at first, it was working fine as I started and restarted many times in the course. But now suddenly when I tried to restart it gave me the error message as:
[....] Restarting apache2 (via systemctl): apache2.serviceJob for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
When checked systemctl status apache2.service
it gave me the folllowing message:
● 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 Mon 2017-06-12 05:49:53 IST; 16s ago
Docs: man:systemd-sysv-generator(8)
Process: 9478 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: *
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: * The apache2 configtest failed.
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: Output of config test was:
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 2 of /et
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: Action 'configtest' failed.
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: The Apache error log may have more information.
Jun 12 05:49:53 yathartha-inspiron systemd[1]: apache2.service: Control process exited, code=exited status=1
Jun 12 05:49:53 yathartha-inspiron systemd[1]: Failed to start LSB: Apache2 web server.
Jun 12 05:49:53 yathartha-inspiron systemd[1]: apache2.service: Unit entered failed state.
Jun 12 05:49:53 yathartha-inspiron systemd[1]: apache2.service: Failed with result 'exit-code'.
What journalctl -u apache2
showed:
Jun 12 05:47:21 yathartha-inspiron systemd[1]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The system clock has been changed to REALTIME microseconds after January 1st, 1970.
Jun 12 05:47:21 yathartha-inspiron systemd[1]: snapd.refresh.timer: Adding 5h 39min 46.253658s random time.
Jun 12 05:47:21 yathartha-inspiron systemd[1]: apt-daily.timer: Adding 1h 20min 25.260017s random time.
Jun 12 05:49:53 yathartha-inspiron sudo[9466]: yathartha : TTY=pts/1 ; PWD=/home/yathartha ; USER=root ; COMMAND=/etc/init.d/apache2 restart
Jun 12 05:49:53 yathartha-inspiron sudo[9466]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jun 12 05:49:53 yathartha-inspiron systemd[1]: Stopped LSB: Apache2 web server.
-- Subject: Unit apache2.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has finished shutting down.
Jun 12 05:49:53 yathartha-inspiron systemd[1]: Starting LSB: Apache2 web server...
-- Subject: Unit apache2.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has begun starting up.
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: * Starting Apache httpd web server apache2
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: *
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: * The apache2 configtest failed.
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: Output of config test was:
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 2 of /et
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: Action 'configtest' failed.
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: The Apache error log may have more information.
Jun 12 05:49:53 yathartha-inspiron systemd[1]: apache2.service: Control process exited, code=exited status=1
Jun 12 05:49:53 yathartha-inspiron systemd[1]: Failed to start LSB: Apache2 web server.
-- Subject: Unit apache2.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has failed.
--
-- The result is failed.
Jun 12 05:49:53 yathartha-inspiron systemd[1]: apache2.service: Unit entered failed state.
Jun 12 05:49:53 yathartha-inspiron systemd[1]: apache2.service: Failed with result 'exit-code'.
Jun 12 05:49:53 yathartha-inspiron sudo[9466]: pam_unix(sudo:session): session closed for user root
Jun 12 05:51:28 yathartha-inspiron org.gnome.evolution.dataserver.Sources5[1582]: ** (evolution-source-registry:1869): WARNING **: secret_servi
lines 1602-1643/1643 (END)
I am not able to figure out what might be the error can anyone please help me out.
16.04 server apache2 php
bumped to the homepage by Community♦ 2 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Add the output ofjournalctl -u apache2
to your question and check your logfiles in/var/log/apache2
.
– Thomas
Jun 11 '17 at 18:02
Please maximise your terminal window and copy/paste the output of the above commands again. At this state we can see only the first half of every line:Jun 11 23:12:50 yathartha-inspiron apache2[7349]: apache2: Syntax error on line???????????
?
– pa4080
Jun 11 '17 at 18:21
@Spas done. Is it okay now?
– Yathartha Joshi
Jun 12 '17 at 0:26
Yes, please post the content of the mentioned lines:Jun 12 05:49:53 yathartha-inspiron apache2[9478]: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 2 of /et
– pa4080
Jun 12 '17 at 0:43
It's not printing, I tried with the full-screen mode(F11), it gave:apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 2 of /etc/apach
Can't make screen more wider.
– Yathartha Joshi
Jun 12 '17 at 6:14
|
show 4 more comments
I installed apache2 on my Ubuntu machine, at first, it was working fine as I started and restarted many times in the course. But now suddenly when I tried to restart it gave me the error message as:
[....] Restarting apache2 (via systemctl): apache2.serviceJob for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
When checked systemctl status apache2.service
it gave me the folllowing message:
● 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 Mon 2017-06-12 05:49:53 IST; 16s ago
Docs: man:systemd-sysv-generator(8)
Process: 9478 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: *
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: * The apache2 configtest failed.
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: Output of config test was:
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 2 of /et
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: Action 'configtest' failed.
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: The Apache error log may have more information.
Jun 12 05:49:53 yathartha-inspiron systemd[1]: apache2.service: Control process exited, code=exited status=1
Jun 12 05:49:53 yathartha-inspiron systemd[1]: Failed to start LSB: Apache2 web server.
Jun 12 05:49:53 yathartha-inspiron systemd[1]: apache2.service: Unit entered failed state.
Jun 12 05:49:53 yathartha-inspiron systemd[1]: apache2.service: Failed with result 'exit-code'.
What journalctl -u apache2
showed:
Jun 12 05:47:21 yathartha-inspiron systemd[1]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The system clock has been changed to REALTIME microseconds after January 1st, 1970.
Jun 12 05:47:21 yathartha-inspiron systemd[1]: snapd.refresh.timer: Adding 5h 39min 46.253658s random time.
Jun 12 05:47:21 yathartha-inspiron systemd[1]: apt-daily.timer: Adding 1h 20min 25.260017s random time.
Jun 12 05:49:53 yathartha-inspiron sudo[9466]: yathartha : TTY=pts/1 ; PWD=/home/yathartha ; USER=root ; COMMAND=/etc/init.d/apache2 restart
Jun 12 05:49:53 yathartha-inspiron sudo[9466]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jun 12 05:49:53 yathartha-inspiron systemd[1]: Stopped LSB: Apache2 web server.
-- Subject: Unit apache2.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has finished shutting down.
Jun 12 05:49:53 yathartha-inspiron systemd[1]: Starting LSB: Apache2 web server...
-- Subject: Unit apache2.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has begun starting up.
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: * Starting Apache httpd web server apache2
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: *
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: * The apache2 configtest failed.
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: Output of config test was:
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 2 of /et
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: Action 'configtest' failed.
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: The Apache error log may have more information.
Jun 12 05:49:53 yathartha-inspiron systemd[1]: apache2.service: Control process exited, code=exited status=1
Jun 12 05:49:53 yathartha-inspiron systemd[1]: Failed to start LSB: Apache2 web server.
-- Subject: Unit apache2.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has failed.
--
-- The result is failed.
Jun 12 05:49:53 yathartha-inspiron systemd[1]: apache2.service: Unit entered failed state.
Jun 12 05:49:53 yathartha-inspiron systemd[1]: apache2.service: Failed with result 'exit-code'.
Jun 12 05:49:53 yathartha-inspiron sudo[9466]: pam_unix(sudo:session): session closed for user root
Jun 12 05:51:28 yathartha-inspiron org.gnome.evolution.dataserver.Sources5[1582]: ** (evolution-source-registry:1869): WARNING **: secret_servi
lines 1602-1643/1643 (END)
I am not able to figure out what might be the error can anyone please help me out.
16.04 server apache2 php
I installed apache2 on my Ubuntu machine, at first, it was working fine as I started and restarted many times in the course. But now suddenly when I tried to restart it gave me the error message as:
[....] Restarting apache2 (via systemctl): apache2.serviceJob for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
When checked systemctl status apache2.service
it gave me the folllowing message:
● 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 Mon 2017-06-12 05:49:53 IST; 16s ago
Docs: man:systemd-sysv-generator(8)
Process: 9478 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: *
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: * The apache2 configtest failed.
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: Output of config test was:
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 2 of /et
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: Action 'configtest' failed.
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: The Apache error log may have more information.
Jun 12 05:49:53 yathartha-inspiron systemd[1]: apache2.service: Control process exited, code=exited status=1
Jun 12 05:49:53 yathartha-inspiron systemd[1]: Failed to start LSB: Apache2 web server.
Jun 12 05:49:53 yathartha-inspiron systemd[1]: apache2.service: Unit entered failed state.
Jun 12 05:49:53 yathartha-inspiron systemd[1]: apache2.service: Failed with result 'exit-code'.
What journalctl -u apache2
showed:
Jun 12 05:47:21 yathartha-inspiron systemd[1]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The system clock has been changed to REALTIME microseconds after January 1st, 1970.
Jun 12 05:47:21 yathartha-inspiron systemd[1]: snapd.refresh.timer: Adding 5h 39min 46.253658s random time.
Jun 12 05:47:21 yathartha-inspiron systemd[1]: apt-daily.timer: Adding 1h 20min 25.260017s random time.
Jun 12 05:49:53 yathartha-inspiron sudo[9466]: yathartha : TTY=pts/1 ; PWD=/home/yathartha ; USER=root ; COMMAND=/etc/init.d/apache2 restart
Jun 12 05:49:53 yathartha-inspiron sudo[9466]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jun 12 05:49:53 yathartha-inspiron systemd[1]: Stopped LSB: Apache2 web server.
-- Subject: Unit apache2.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has finished shutting down.
Jun 12 05:49:53 yathartha-inspiron systemd[1]: Starting LSB: Apache2 web server...
-- Subject: Unit apache2.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has begun starting up.
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: * Starting Apache httpd web server apache2
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: *
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: * The apache2 configtest failed.
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: Output of config test was:
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 2 of /et
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: Action 'configtest' failed.
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: The Apache error log may have more information.
Jun 12 05:49:53 yathartha-inspiron systemd[1]: apache2.service: Control process exited, code=exited status=1
Jun 12 05:49:53 yathartha-inspiron systemd[1]: Failed to start LSB: Apache2 web server.
-- Subject: Unit apache2.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has failed.
--
-- The result is failed.
Jun 12 05:49:53 yathartha-inspiron systemd[1]: apache2.service: Unit entered failed state.
Jun 12 05:49:53 yathartha-inspiron systemd[1]: apache2.service: Failed with result 'exit-code'.
Jun 12 05:49:53 yathartha-inspiron sudo[9466]: pam_unix(sudo:session): session closed for user root
Jun 12 05:51:28 yathartha-inspiron org.gnome.evolution.dataserver.Sources5[1582]: ** (evolution-source-registry:1869): WARNING **: secret_servi
lines 1602-1643/1643 (END)
I am not able to figure out what might be the error can anyone please help me out.
16.04 server apache2 php
16.04 server apache2 php
edited Jun 12 '17 at 0:25
Yathartha Joshi
asked Jun 11 '17 at 17:58
Yathartha JoshiYathartha Joshi
12615
12615
bumped to the homepage by Community♦ 2 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 2 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Add the output ofjournalctl -u apache2
to your question and check your logfiles in/var/log/apache2
.
– Thomas
Jun 11 '17 at 18:02
Please maximise your terminal window and copy/paste the output of the above commands again. At this state we can see only the first half of every line:Jun 11 23:12:50 yathartha-inspiron apache2[7349]: apache2: Syntax error on line???????????
?
– pa4080
Jun 11 '17 at 18:21
@Spas done. Is it okay now?
– Yathartha Joshi
Jun 12 '17 at 0:26
Yes, please post the content of the mentioned lines:Jun 12 05:49:53 yathartha-inspiron apache2[9478]: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 2 of /et
– pa4080
Jun 12 '17 at 0:43
It's not printing, I tried with the full-screen mode(F11), it gave:apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 2 of /etc/apach
Can't make screen more wider.
– Yathartha Joshi
Jun 12 '17 at 6:14
|
show 4 more comments
Add the output ofjournalctl -u apache2
to your question and check your logfiles in/var/log/apache2
.
– Thomas
Jun 11 '17 at 18:02
Please maximise your terminal window and copy/paste the output of the above commands again. At this state we can see only the first half of every line:Jun 11 23:12:50 yathartha-inspiron apache2[7349]: apache2: Syntax error on line???????????
?
– pa4080
Jun 11 '17 at 18:21
@Spas done. Is it okay now?
– Yathartha Joshi
Jun 12 '17 at 0:26
Yes, please post the content of the mentioned lines:Jun 12 05:49:53 yathartha-inspiron apache2[9478]: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 2 of /et
– pa4080
Jun 12 '17 at 0:43
It's not printing, I tried with the full-screen mode(F11), it gave:apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 2 of /etc/apach
Can't make screen more wider.
– Yathartha Joshi
Jun 12 '17 at 6:14
Add the output of
journalctl -u apache2
to your question and check your logfiles in /var/log/apache2
.– Thomas
Jun 11 '17 at 18:02
Add the output of
journalctl -u apache2
to your question and check your logfiles in /var/log/apache2
.– Thomas
Jun 11 '17 at 18:02
Please maximise your terminal window and copy/paste the output of the above commands again. At this state we can see only the first half of every line:
Jun 11 23:12:50 yathartha-inspiron apache2[7349]: apache2: Syntax error on line???????????
?– pa4080
Jun 11 '17 at 18:21
Please maximise your terminal window and copy/paste the output of the above commands again. At this state we can see only the first half of every line:
Jun 11 23:12:50 yathartha-inspiron apache2[7349]: apache2: Syntax error on line???????????
?– pa4080
Jun 11 '17 at 18:21
@Spas done. Is it okay now?
– Yathartha Joshi
Jun 12 '17 at 0:26
@Spas done. Is it okay now?
– Yathartha Joshi
Jun 12 '17 at 0:26
Yes, please post the content of the mentioned lines:
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 2 of /et
– pa4080
Jun 12 '17 at 0:43
Yes, please post the content of the mentioned lines:
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 2 of /et
– pa4080
Jun 12 '17 at 0:43
It's not printing, I tried with the full-screen mode(F11), it gave:
apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 2 of /etc/apach
Can't make screen more wider.– Yathartha Joshi
Jun 12 '17 at 6:14
It's not printing, I tried with the full-screen mode(F11), it gave:
apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 2 of /etc/apach
Can't make screen more wider.– Yathartha Joshi
Jun 12 '17 at 6:14
|
show 4 more comments
1 Answer
1
active
oldest
votes
As the message Cannot load /usr/lib/apache2/modules/libphp7.0.so into server
suggested your mod_php might have be broken/missing/accidentally removed/etc. Try run sudo apt-get install --reinstall libapache2-mod-php7.0
to reinstall the package and then restart apache again.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f924380%2fapache2-not-able-to-restart-in-ubuntu-16-04%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
As the message Cannot load /usr/lib/apache2/modules/libphp7.0.so into server
suggested your mod_php might have be broken/missing/accidentally removed/etc. Try run sudo apt-get install --reinstall libapache2-mod-php7.0
to reinstall the package and then restart apache again.
add a comment |
As the message Cannot load /usr/lib/apache2/modules/libphp7.0.so into server
suggested your mod_php might have be broken/missing/accidentally removed/etc. Try run sudo apt-get install --reinstall libapache2-mod-php7.0
to reinstall the package and then restart apache again.
add a comment |
As the message Cannot load /usr/lib/apache2/modules/libphp7.0.so into server
suggested your mod_php might have be broken/missing/accidentally removed/etc. Try run sudo apt-get install --reinstall libapache2-mod-php7.0
to reinstall the package and then restart apache again.
As the message Cannot load /usr/lib/apache2/modules/libphp7.0.so into server
suggested your mod_php might have be broken/missing/accidentally removed/etc. Try run sudo apt-get install --reinstall libapache2-mod-php7.0
to reinstall the package and then restart apache again.
answered Jun 13 '17 at 8:21
Kaijia FengKaijia Feng
843
843
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f924380%2fapache2-not-able-to-restart-in-ubuntu-16-04%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Add the output of
journalctl -u apache2
to your question and check your logfiles in/var/log/apache2
.– Thomas
Jun 11 '17 at 18:02
Please maximise your terminal window and copy/paste the output of the above commands again. At this state we can see only the first half of every line:
Jun 11 23:12:50 yathartha-inspiron apache2[7349]: apache2: Syntax error on line???????????
?– pa4080
Jun 11 '17 at 18:21
@Spas done. Is it okay now?
– Yathartha Joshi
Jun 12 '17 at 0:26
Yes, please post the content of the mentioned lines:
Jun 12 05:49:53 yathartha-inspiron apache2[9478]: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 2 of /et
– pa4080
Jun 12 '17 at 0:43
It's not printing, I tried with the full-screen mode(F11), it gave:
apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 2 of /etc/apach
Can't make screen more wider.– Yathartha Joshi
Jun 12 '17 at 6:14