3
root@tasnim:/home/tara# service apache2 restart
 * Restarting web server apache2                                         [fail] 
 * The apache2 configtest failed.

Output of config test was:

AH00534: apache2: Configuration error: No MPM loaded.
Action 'configtest' failed.

Using

sudo a2enmod mpm_prefork
service apache2 restart

I got:

root@tasnim:/home/tara# service apache2 restart
 * Restarting web server apache2                                  [fail] 
 * The apache2 configtest failed.

Output of config test was:

AH00526: Syntax error on line 156 of /etc/apache2/apache2.conf:
Invalid command 'Require', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
The Apache error log may have more information.

Then i open the /etc/apache2/apache2.conf file and got that:

//access here, or in any related virtual host.
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Require all denied //this is line 156
</Directory>

Using

 apt-cache policy apache2

i got:

root@tasnim:/home/tara# apt-cache policy apache2
apache2:
Installed: 2.4.7-1ubuntu4.4
Candidate: 2.4.7-1ubuntu4.4
Version table:
*** 2.4.7-1ubuntu4.4 0
    500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
    500 http://archive.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
    100 /var/lib/dpkg/status
 2.4.7-1ubuntu4 0
    500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

Using

 a2query -v

i got:

root@tasnim:/home/tara# a2query -v
2.4.7
  • 1
    Please don't use HTML to format. See askubuntu.com/help/formatting – muru May 8 '15 at 9:01
  • Which version of Apache are you using? How did you install it? Add the output of apt-cache policy apache2 and a2query -v. – muru May 8 '15 at 9:03
4

I had the same problem Like :

Starting web server apache2 
* The apache2 configtest failed. 
Output of config test was: apache2: 
Syntax error on line 140 of /etc/apache2/apache2.conf: 
Syntax error on line 2 of /etc/apache2/mods-enabled/mpm_itk.load: 
Cannot load /usr/lib/apache2/modules/mpm_itk.so into server: 
/usr/lib/apache2/modules/mpm_itk.so: cannot open shared object file:
No such file or directory Action 'configtest' failed. 
The Apache error log may have more information.

I try this : apt-get install libapache2-mpm-itk so I resolve my problem, reinstall the files which is missing so i can recover.

Thanks I hop you guys can get solution.

  • This will enable the prefork mpm – Ahmad Mushtaq Jul 12 '16 at 8:48
0
sudo a2enmod auth_basic authn_core authn_file authz_core authz_host authz_user access_compat

enable modules to start the server

Taken from this answer by A.B. to this question on Unix & Linux SE

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.