Ubuntu 16.04 php 7.0 apache not working

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I am trying to get this to work and am having no luck here is my apache config any help with what is wrong would be appreciated.



<VirtualHost *:80>
ServerAdmin webmaster@qis.net
ServerName www.site.com
DocumentRoot /var/www/sites/www.site.com/httpdocs
ScriptAlias "cgi-bin" "/var/www/sites/www.site.com/cgi-bin"

ErrorLog $APACHE_LOG_DIR/site.com.error_log

LogLevel debug

CustomLog $APACHE_LOG_DIR/www.site.com.log combined


<IfModule mod_fastcgi.c>

AddHandler php7-fcgi-kermit .php
Action php7-fcgi-kermit /php7-fcgi-kermit
Alias /php7-fcgi-kermit /usr/lib/cgi-bin/php7-fcgi-kermit
FastCgiExternalServer /usr/lib/cgi-bin/php7-fcgi-kermit -socket /run/php/php7.0-fpm.kermit.sock -pass-header Authorization

<Directory "/usr/lib/cgi-bin">
Require all granted
</Directory>
</IfModule>


<IfModule mod_fastcgi.c>
<FilesMatch ".+.ph(p[345]?|t|tml)$">
SetHandler php7-fcgi-kermit
</FilesMatch>
</IfModule>

</VirtualHost>


The site is not working at all and not even throwing an error in the log. It did throw this error yesterday



AH00128: File does not exist: /var/www/sites/www.site.com/php7-fcgi/wp-admin/install.php



Update:



I disabled the 000-default site and only left the vhost and now it is logging this error.



[Tue Mar 20 13:57:40.661109 2018] [fastcgi:error] [pid 7060:tid 140644508116736] (13)Permission denied: [client xxx.xxx.xxx.xxx:49471] FastCGI: failed to connect to server "/usr/lib/cgi-bin/php7-fcgi-kermit": connect() failed
[Tue Mar 20 13:57:40.661130 2018] [fastcgi:error] [pid 7060:tid 140644508116736] [client xxx.xxx.xxx.xxx:49471] FastCGI: incomplete headers (0 bytes) received from server "/usr/lib/cgi-bin/php7-fcgi-kermit


I changed the php part of the conf to read as follows:



<IfModule mod_fastcgi.c>

AddHandler php7-fcgi .php
Action php7-fcgi /php7-fcgi
Alias /php7-fcgi-kermit /usr/lib/cgi-bin/php7-fcgi-kermit
FastCgiExternalServer /usr/lib/cgi-bin/php7-fcgi-kermit -socket /run/php/php7.0-fpm.kermit.sock -pass-header Authorization

<Directory "/usr/lib/cgi-bin">
Require all granted
</Directory>
</IfModule>


<IfModule mod_fastcgi.c>


After I did this I get the following error but fpm is running and the fastcgi module is loaded



Error: PHP is not running



Any ideas?










share|improve this question



















  • 1




    What is not working? Is Apache throwing errors? Is FastCGI not working? Is mod_fastcgi enabled? Is the site not working at all? What does the error log show if so? Edit your question with the answers.
    – vidarlo
    Mar 20 at 17:34











  • fpm seems to be running and so is apache but it is changing the DocumentRoot to contain php7-fcgi which should not be there
    – QIS_Willie
    Mar 20 at 17:51














up vote
0
down vote

favorite












I am trying to get this to work and am having no luck here is my apache config any help with what is wrong would be appreciated.



<VirtualHost *:80>
ServerAdmin webmaster@qis.net
ServerName www.site.com
DocumentRoot /var/www/sites/www.site.com/httpdocs
ScriptAlias "cgi-bin" "/var/www/sites/www.site.com/cgi-bin"

ErrorLog $APACHE_LOG_DIR/site.com.error_log

LogLevel debug

CustomLog $APACHE_LOG_DIR/www.site.com.log combined


<IfModule mod_fastcgi.c>

AddHandler php7-fcgi-kermit .php
Action php7-fcgi-kermit /php7-fcgi-kermit
Alias /php7-fcgi-kermit /usr/lib/cgi-bin/php7-fcgi-kermit
FastCgiExternalServer /usr/lib/cgi-bin/php7-fcgi-kermit -socket /run/php/php7.0-fpm.kermit.sock -pass-header Authorization

<Directory "/usr/lib/cgi-bin">
Require all granted
</Directory>
</IfModule>


<IfModule mod_fastcgi.c>
<FilesMatch ".+.ph(p[345]?|t|tml)$">
SetHandler php7-fcgi-kermit
</FilesMatch>
</IfModule>

</VirtualHost>


The site is not working at all and not even throwing an error in the log. It did throw this error yesterday



AH00128: File does not exist: /var/www/sites/www.site.com/php7-fcgi/wp-admin/install.php



Update:



I disabled the 000-default site and only left the vhost and now it is logging this error.



[Tue Mar 20 13:57:40.661109 2018] [fastcgi:error] [pid 7060:tid 140644508116736] (13)Permission denied: [client xxx.xxx.xxx.xxx:49471] FastCGI: failed to connect to server "/usr/lib/cgi-bin/php7-fcgi-kermit": connect() failed
[Tue Mar 20 13:57:40.661130 2018] [fastcgi:error] [pid 7060:tid 140644508116736] [client xxx.xxx.xxx.xxx:49471] FastCGI: incomplete headers (0 bytes) received from server "/usr/lib/cgi-bin/php7-fcgi-kermit


I changed the php part of the conf to read as follows:



<IfModule mod_fastcgi.c>

AddHandler php7-fcgi .php
Action php7-fcgi /php7-fcgi
Alias /php7-fcgi-kermit /usr/lib/cgi-bin/php7-fcgi-kermit
FastCgiExternalServer /usr/lib/cgi-bin/php7-fcgi-kermit -socket /run/php/php7.0-fpm.kermit.sock -pass-header Authorization

<Directory "/usr/lib/cgi-bin">
Require all granted
</Directory>
</IfModule>


<IfModule mod_fastcgi.c>


After I did this I get the following error but fpm is running and the fastcgi module is loaded



Error: PHP is not running



Any ideas?










share|improve this question



















  • 1




    What is not working? Is Apache throwing errors? Is FastCGI not working? Is mod_fastcgi enabled? Is the site not working at all? What does the error log show if so? Edit your question with the answers.
    – vidarlo
    Mar 20 at 17:34











  • fpm seems to be running and so is apache but it is changing the DocumentRoot to contain php7-fcgi which should not be there
    – QIS_Willie
    Mar 20 at 17:51












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am trying to get this to work and am having no luck here is my apache config any help with what is wrong would be appreciated.



<VirtualHost *:80>
ServerAdmin webmaster@qis.net
ServerName www.site.com
DocumentRoot /var/www/sites/www.site.com/httpdocs
ScriptAlias "cgi-bin" "/var/www/sites/www.site.com/cgi-bin"

ErrorLog $APACHE_LOG_DIR/site.com.error_log

LogLevel debug

CustomLog $APACHE_LOG_DIR/www.site.com.log combined


<IfModule mod_fastcgi.c>

AddHandler php7-fcgi-kermit .php
Action php7-fcgi-kermit /php7-fcgi-kermit
Alias /php7-fcgi-kermit /usr/lib/cgi-bin/php7-fcgi-kermit
FastCgiExternalServer /usr/lib/cgi-bin/php7-fcgi-kermit -socket /run/php/php7.0-fpm.kermit.sock -pass-header Authorization

<Directory "/usr/lib/cgi-bin">
Require all granted
</Directory>
</IfModule>


<IfModule mod_fastcgi.c>
<FilesMatch ".+.ph(p[345]?|t|tml)$">
SetHandler php7-fcgi-kermit
</FilesMatch>
</IfModule>

</VirtualHost>


The site is not working at all and not even throwing an error in the log. It did throw this error yesterday



AH00128: File does not exist: /var/www/sites/www.site.com/php7-fcgi/wp-admin/install.php



Update:



I disabled the 000-default site and only left the vhost and now it is logging this error.



[Tue Mar 20 13:57:40.661109 2018] [fastcgi:error] [pid 7060:tid 140644508116736] (13)Permission denied: [client xxx.xxx.xxx.xxx:49471] FastCGI: failed to connect to server "/usr/lib/cgi-bin/php7-fcgi-kermit": connect() failed
[Tue Mar 20 13:57:40.661130 2018] [fastcgi:error] [pid 7060:tid 140644508116736] [client xxx.xxx.xxx.xxx:49471] FastCGI: incomplete headers (0 bytes) received from server "/usr/lib/cgi-bin/php7-fcgi-kermit


I changed the php part of the conf to read as follows:



<IfModule mod_fastcgi.c>

AddHandler php7-fcgi .php
Action php7-fcgi /php7-fcgi
Alias /php7-fcgi-kermit /usr/lib/cgi-bin/php7-fcgi-kermit
FastCgiExternalServer /usr/lib/cgi-bin/php7-fcgi-kermit -socket /run/php/php7.0-fpm.kermit.sock -pass-header Authorization

<Directory "/usr/lib/cgi-bin">
Require all granted
</Directory>
</IfModule>


<IfModule mod_fastcgi.c>


After I did this I get the following error but fpm is running and the fastcgi module is loaded



Error: PHP is not running



Any ideas?










share|improve this question















I am trying to get this to work and am having no luck here is my apache config any help with what is wrong would be appreciated.



<VirtualHost *:80>
ServerAdmin webmaster@qis.net
ServerName www.site.com
DocumentRoot /var/www/sites/www.site.com/httpdocs
ScriptAlias "cgi-bin" "/var/www/sites/www.site.com/cgi-bin"

ErrorLog $APACHE_LOG_DIR/site.com.error_log

LogLevel debug

CustomLog $APACHE_LOG_DIR/www.site.com.log combined


<IfModule mod_fastcgi.c>

AddHandler php7-fcgi-kermit .php
Action php7-fcgi-kermit /php7-fcgi-kermit
Alias /php7-fcgi-kermit /usr/lib/cgi-bin/php7-fcgi-kermit
FastCgiExternalServer /usr/lib/cgi-bin/php7-fcgi-kermit -socket /run/php/php7.0-fpm.kermit.sock -pass-header Authorization

<Directory "/usr/lib/cgi-bin">
Require all granted
</Directory>
</IfModule>


<IfModule mod_fastcgi.c>
<FilesMatch ".+.ph(p[345]?|t|tml)$">
SetHandler php7-fcgi-kermit
</FilesMatch>
</IfModule>

</VirtualHost>


The site is not working at all and not even throwing an error in the log. It did throw this error yesterday



AH00128: File does not exist: /var/www/sites/www.site.com/php7-fcgi/wp-admin/install.php



Update:



I disabled the 000-default site and only left the vhost and now it is logging this error.



[Tue Mar 20 13:57:40.661109 2018] [fastcgi:error] [pid 7060:tid 140644508116736] (13)Permission denied: [client xxx.xxx.xxx.xxx:49471] FastCGI: failed to connect to server "/usr/lib/cgi-bin/php7-fcgi-kermit": connect() failed
[Tue Mar 20 13:57:40.661130 2018] [fastcgi:error] [pid 7060:tid 140644508116736] [client xxx.xxx.xxx.xxx:49471] FastCGI: incomplete headers (0 bytes) received from server "/usr/lib/cgi-bin/php7-fcgi-kermit


I changed the php part of the conf to read as follows:



<IfModule mod_fastcgi.c>

AddHandler php7-fcgi .php
Action php7-fcgi /php7-fcgi
Alias /php7-fcgi-kermit /usr/lib/cgi-bin/php7-fcgi-kermit
FastCgiExternalServer /usr/lib/cgi-bin/php7-fcgi-kermit -socket /run/php/php7.0-fpm.kermit.sock -pass-header Authorization

<Directory "/usr/lib/cgi-bin">
Require all granted
</Directory>
</IfModule>


<IfModule mod_fastcgi.c>


After I did this I get the following error but fpm is running and the fastcgi module is loaded



Error: PHP is not running



Any ideas?







server permissions apache2 php






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 21 at 16:35









pa4080

12.3k52256




12.3k52256










asked Mar 20 at 17:18









QIS_Willie

11




11







  • 1




    What is not working? Is Apache throwing errors? Is FastCGI not working? Is mod_fastcgi enabled? Is the site not working at all? What does the error log show if so? Edit your question with the answers.
    – vidarlo
    Mar 20 at 17:34











  • fpm seems to be running and so is apache but it is changing the DocumentRoot to contain php7-fcgi which should not be there
    – QIS_Willie
    Mar 20 at 17:51












  • 1




    What is not working? Is Apache throwing errors? Is FastCGI not working? Is mod_fastcgi enabled? Is the site not working at all? What does the error log show if so? Edit your question with the answers.
    – vidarlo
    Mar 20 at 17:34











  • fpm seems to be running and so is apache but it is changing the DocumentRoot to contain php7-fcgi which should not be there
    – QIS_Willie
    Mar 20 at 17:51







1




1




What is not working? Is Apache throwing errors? Is FastCGI not working? Is mod_fastcgi enabled? Is the site not working at all? What does the error log show if so? Edit your question with the answers.
– vidarlo
Mar 20 at 17:34





What is not working? Is Apache throwing errors? Is FastCGI not working? Is mod_fastcgi enabled? Is the site not working at all? What does the error log show if so? Edit your question with the answers.
– vidarlo
Mar 20 at 17:34













fpm seems to be running and so is apache but it is changing the DocumentRoot to contain php7-fcgi which should not be there
– QIS_Willie
Mar 20 at 17:51




fpm seems to be running and so is apache but it is changing the DocumentRoot to contain php7-fcgi which should not be there
– QIS_Willie
Mar 20 at 17:51















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1017699%2fubuntu-16-04-php-7-0-apache-not-working%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1017699%2fubuntu-16-04-php-7-0-apache-not-working%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

pylint3 and pip3 broken

Missing snmpget and snmpwalk

How to enroll fingerprints to Ubuntu 17.10 with VFS491