Unix & Linux Asked by Kevdog777 on February 15, 2021
I am using Ubuntu 15 64-bit:
$ uname -a
Linux {hostname} 4.2.0-16-generic
And I have installed apache2
:
$ sudo apt-get install -y apache2
I have a mod_xxx.so
, which I have placed into: /usr/lib/apache2/modules/
. I set the permissions to 755 (rwx r-x r-x).
I edited the apache2.conf
:
$ sudo vi /etc/apache2/apache2.conf
AddHandler xxx-handler .xxx
LoadModule xxx_module modules/mod_xxx.so
I know this works, as I have done this on several other Linux machines before.
When I try to restart Apache, it is failing with this error:
$ sudo service apache2 restart
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
After doing, what it says above, systemctl status apache2.service
, it shows this:
apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2)
Active: failed (Result: exit-code) since Wed 2016-03-09 10:32:34 GMT; 9s ago
Docs: man:systemd-sysv-generator(8)
Process: 3479 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
Process: 3503 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
Mar 09 10:32:34 Ubuntu14 apache2[3503]: *
Mar 09 10:32:34 Ubuntu14 apache2[3503]: * The apache2 configtest failed.
Mar 09 10:32:34 Ubuntu14 apache2[3503]: Output of config test was:
Mar 09 10:32:34 Ubuntu14 apache2[3503]: apache2: Syntax error on line 224 of...y
Mar 09 10:32:34 Ubuntu14 apache2[3503]: Action 'configtest' failed.
Mar 09 10:32:34 Ubuntu14 apache2[3503]: The Apache error log may have more i....
Mar 09 10:32:34 Ubuntu14 systemd[1]: apache2.service: Control process exite...=1
Mar 09 10:32:34 Ubuntu14 systemd[1]: Failed to start LSB: Apache2 web server.
Mar 09 10:32:34 Ubuntu14 systemd[1]: apache2.service: Unit entered failed state.
Mar 09 10:32:34 Ubuntu14 systemd[1]: apache2.service: Failed with result 'e...'.
Hint: Some lines were ellipsized, use -l to show in full.
So I have tried to search everywhere for where LoadModule
is specified. So I have tried doing this:
$ sudo grep "LoadModule" /
I have also tried this:
sudo find / -type f grep -l "LoadModule"
Still no luck.
Where is the LoadModule
specified, in Apache 2.4.12
?
I know that in Apache 2.4.7
, it is in the apache.conf
file, which I have used the same logic here that I have used in the newer version.
This is done on a Virtual Machine, so if an error does happen, I can clean the machine and start again. I am the root user too.
The issue here, was that I had to use:
sudo a2enmod xxx.load
Then it said to restart Apache2. I did that, and now it is working.
This version of Apache (2.4.12) works different to how 2.4.7 works, so I had to do things a little differently.
Correct answer by Kevdog777 on February 15, 2021
I have solved the problem.
$ sudo service apache2 start
Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
apache2.service Failed Because the Control Process Exited with Error Code and apache2 service activation:failed perfect solution.
$ systemctl restart apache2
$ journal -xe
$ sudo apt-get purge apache2
$ sudo apt autoremove apache2
$ sudo apt-get purge apache2
$ sudo apt-get purge apache2*
$ sudo apt-get install apache2
$ sudo service apache2 start
Answered by theblackthreat on February 15, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP