Ubuntu 16.04 php 7.0 apache not working
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
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?
server permissions apache2 php
add a comment |Â
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?
server permissions apache2 php
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
add a comment |Â
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?
server permissions apache2 php
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
server permissions apache2 php
edited Mar 21 at 16:35
![](https://i.stack.imgur.com/Lrlbx.jpg?s=32&g=1)
![](https://i.stack.imgur.com/Lrlbx.jpg?s=32&g=1)
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
add a comment |Â
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
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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