Apache2 "configtest failed" when trying to reboot

I tried to protect the directory in my www folder using the .htaccess file, which had no effect, so I changed the line

AllowOverride None 

in apache2.conf for

  AllowOverride All 

as root.

Now I see that this is not the best way to do this. when trying to restart apache using

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

The following error message appears:

  [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. Apache2 error.log does not contain any information. And line 140 in the configuration file

  IncludeOptional mods-enabled/*.load 

as the error message indicates that libphp5.so in / usr / lib / apache 2 / modules is just libphp5filter.so

+4
source share
2 answers
 apt-get install libapache2-mod-php5 

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

+20
source

I know :) that before you want to add a copy of / etc / apache 2 / sites-available / default. So you need to remove it (e.g. site1): sudo a2dissite site1 && & & sudo a2ensite by default

+2
source

All Articles