Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error during libapache2-mod-fastcgi installation

I tried to install php5-fpm, but currently got stuck when trying to install libapache2-mod-fastcgi installation.

I get the following message:

After this operation, 250 kB of additional disk space will be used.
Selecting previously unselected package libapache2-mod-fastcgi.
(Reading database ... 63345 files and directories currently installed.)
Preparing to unpack .../libapache2-mod-fastcgi_2.4.7~0910052141-1.1_amd64.deb ...
Unpacking libapache2-mod-fastcgi (2.4.7~0910052141-1.1) ...
Setting up libapache2-mod-fastcgi (2.4.7~0910052141-1.1) ...
apache2_invoke: Enable module fastcgi
Action 'configtest' failed.
The Apache error log may have more information.
apache2_reload: Your configuration is broken. Not restarting Apache 2

I will post my apache log shortly, since it is a big file and i need to parse it first.

by the way i did a quick:

grep -RIs "FastCgiExternalServer" /etc/apache2

and got the following response:

/etc/apache2/conf-available/php5-fpm.conf:FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization

And this as well, when i try to restart Apache:

 * Restarting web server apache2                                                                                                        [fail] 
 * The apache2 configtest failed.
Output of config test was:
AH00526: Syntax error on line 4 of /etc/apache2/mods-enabled/fastcgi.conf:
FastCgiIpcDir /var/lib/apache2/fastcgi: access for server (uid 33, gid 33) failed: write not allowed
Action 'configtest' failed.
The Apache error log may have more information.

This is the file that contains the offending line:

<IfModule mod_fastcgi.c>
  AddHandler fastcgi-script .fcgi
  #FastCgiWrapper /usr/lib/apache2/suexec
  FastCgiIpcDir /var/lib/apache2/fastcgi
</IfModule>

Can anyone help me ?

like image 939
Jeremy Avatar asked Nov 24 '15 18:11

Jeremy


1 Answers

I had the same error. Originally /var/lib/apache2/fastcgi was already owned by www-data. I had to change permission of /var/lib/apache2/fastcgi (all files/recursive) to 0777. I tried 0744 and 0755 but the error persisted with those configs.

like image 79
jarvis Avatar answered Oct 27 '22 14:10

jarvis