supersambo
supersambo

Reputation: 811

Apache2 "configtest failed" when trying to restart

i tried to protect a directory in my www-folder by using a .htaccess file which had no effect so i changed line

    AllowOverride None

in my apache2.conf to

    AllowOverride All

as root.

now i see that this wasn't the right way to do it. when trying to restart apache using

    /etc/init.d/apache2 restart (or stop and start)

I'm getting the following error message:

    [FAIL] Starting web server: apache2 failed!
    [warn] The apache2 configtest failed. ... (warning).
    Output of config test was:
    apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on         line 1 of /etc/apache2/mods-enabled/php5.load: Cannot load /usr/lib/apache2/modules/libphp5.so into server: /usr/lib/apache2/modules/libphp5.so: cannot open shared         object file: No such file or directory
    Action 'configtest' failed.
    The Apache error log may have more information.

I changed the line to AllowOverride None again but the problem remains. The apache2 error.log does not contain any information. And Line 140 in the config file is

    IncludeOptional mods-enabled/*.load

as the error message indicates there is no libphp5.so in /usr/lib/apache2/modules just libphp5filter.so

Upvotes: 4

Views: 35349

Answers (2)

user1358444
user1358444

Reputation: 88

I know:) that before you wanted add copy of /etc/apache2/sites-available/default. So u have to delete it (ex. site1): sudo a2dissite site1 && sudo a2ensite default

Upvotes: 2

supersambo
supersambo

Reputation: 811

apt-get install libapache2-mod-php5

just did the job. Now I'm not sure if the changes apache2.conf actually caused the problem...

Upvotes: 20

Related Questions