Latest ISPConfig on CentOS 7. After reboot cannot access ISPConfig Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error. More information about this error may be available in the server error log. httpd error log results in: [Sun Apr 26 21:14:27.978783 2015] [fcgid:warn] [pid 883] (104)Connection reset by peer: [client 207.6.66.38:48010] mod_fcgid: error reading data from FastCGI server [Sun Apr 26 21:14:27.978853 2015] [core:error] [pid 883] [client 207.6.66.38:48010] End of script output before headers: index.php [Mon Apr 27 10:25:45.471664 2015] [fcgid:warn] [pid 27030] (104)Connection reset by peer: [client 207.6.66.38:48943] mod_fcgid: error reading data from FastCGI server [Mon Apr 27 10:25:45.471740 2015] [core:error] [pid 27030] [client 207.6.66.38:48943] End of script output before headers: index.php Any suggestions please on this error? or where to look? I am hoping that the server has not been hacked. Cheers, korbynn
The error means that php did not return any data. you can try to turn on php errors in php.ini on the screen, maybe you see a more detailed error message then.
Got totally sided tracked. Trying to figure out what PHP values I need to set to figure out what the error is. need to find out why 'mod_fcgid: error reading data from FastCGI server'.
setting display_errors = On does not produce any more error data. I will review the Perfect Server install for CentOS 7 and see what could be missing. As I have stated before, the hosting company changed some of the config and have not told me what they refreshed/changed. Website is being served but not ISPConfig.
Going through the error logs there seems to be a consistent error accessing /var/www/html. My other install does not have this error.
Where do the ispconfig console logs live? I seems it doesn't manner what error level I set the master php.ini file to I still get the same info but no other errors that can help me find out what the error is.
The message that you posted in the first post indicates that ispconfig is not even run due to a php config problem, so there can not be any messages from ispconfig in a log file. Try to put a info.php file into /usr/local/ispconfig/interface/web/, chown it to user and group ispconfig and try to accesss that in a browser to see if php is working at all.
Yes, you are correct that php is not working for port 8080. This is weird, everything else is running except for the ispconfig console. I even did an update to ispconfig with no joy. Looks like a permissions problem.
Here is a copy of the ispconfig.vhost. Code: ###################################################### # This virtual host contains the configuration # for the ISPConfig controlpanel ###################################################### Listen 8080 NameVirtualHost *:8080 <VirtualHost _default_:8080> ServerAdmin webmaster@localhost <FilesMatch "\.ph(p3?|tml)$"> SetHandler None </FilesMatch> <IfModule mod_fcgid.c> DocumentRoot /var/www/ispconfig/ SuexecUserGroup ispconfig ispconfig <Directory /var/www/ispconfig/> Options -Indexes +FollowSymLinks +MultiViews +ExecCGI AllowOverride AuthConfig Indexes Limit Options FileInfo <FilesMatch "\.php$"> SetHandler fcgid-script </FilesMatch> FCGIWrapper /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter .php Require all granted </Directory> IPCCommTimeout 7200 MaxRequestLen 15728640 </IfModule> <IfModule mpm_itk_module> DocumentRoot /usr/local/ispconfig/interface/web/ AssignUserId ispconfig ispconfig AddType application/x-httpd-php .php <Directory /usr/local/ispconfig/interface/web> # php_admin_value open_basedir "/usr/local/ispconfig/interface:/usr/share:/tmp" Options +FollowSymLinks AllowOverride None Require all granted php_value magic_quotes_gpc 0 </Directory> </IfModule> # ErrorLog /var/log/apache2/error.log # CustomLog /var/log/apache2/access.log combined ServerSignature Off <IfModule mod_security2.c> SecRuleEngine Off </IfModule> # SSL Configuration SSLEngine On SSLProtocol All -SSLv2 -SSLv3 SSLCertificateFile /usr/local/ispconfig/interface/ssl/ispserver.crt SSLCertificateKeyFile /usr/local/ispconfig/interface/ssl/ispserver.key #SSLCACertificateFile /usr/local/ispconfig/interface/ssl/ispserver.bundle </VirtualHost> <Directory /var/www/php-cgi-scripts> AllowOverride None Require all denied </Directory> <Directory /var/www/php-fcgi-scripts> AllowOverride None Require all denied </Directory> What permissions am I missing? Running php index.htm from /usr/local/ispconfig/interface//web produces the correct html output. Cheers, Korbynn
A;so port 8080 is visible from outside. How do I test that the /etc/httpd/conf/sites-available are being loaded properly?
Changed port to 8000 I get the same issue. Just checking phpinfo on both of my installs CentOS 7 install has Server API CGI/FastCGI CentOS 6.5 install has Server API Apache 2.0 Handler Could this be a problem. I really need to get this working by monday. Cheers, korbynn
Just reviewing the apache config files. My CentOS 6.5 version is 1014 lines long with PHP 5.4.41/Apache/2.2.15 (Unix) installed. My CentOS 7 version is 359 lines long with PHP 5.4.16/Apache/2.4.6 (CentOS) installed. Is this httpd.conf missing anything?
Just checking logs. This started about the time the ispconfig panel became inaccessible. Found that /var/log/php-fpm/error.log is filled with: failed to notify status to systemd No other errors except: NOTICE: error log file re-opened as the first line. Is there an issue with mod-fpm/php-fpm? Cheers, korbynn
just a regular HTM file is accessible from the browser. Running /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter .php <index.php from /var/www/ispconfig/ produces valid output.
Looks like possibly I found the problem. The directive for mod_fcgi.c is not compiled or available for apache hence the code is not even being executed and why execution is terminated with error and no output. The hosting company refreshed the server and may have changed the install with a version that does not work with fcgiwrapper. I am going to try to use the suphp wrapper that is working on the hosted website. I need to make this work now! Any suggestions getting fcgi working again? Cheers, korbynn
fcgi should be available. go trough the perfect server side instructions and ensure that all packages are installed. then check the httpd.conf file from centos to ensure that fcgi is loaded.
It appears that fcgi modules are loaded: Code: httpd -M -- snip--- proxy_ajp_module (shared) proxy_balancer_module (shared) proxy_connect_module (shared) proxy_express_module (shared) proxy_fcgi_module (shared) <--- proxy_fdpass_module (shared) proxy_ftp_module (shared) proxy_http_module (shared) proxy_scgi_module (shared) ssl_module (shared) systemd_module (shared) cgi_module (shared) perl_module (shared) fcgid_module (shared) <--- php5_module (shared) python_module (shared) suphp_module (shared) This is apparently turned on in /etc/httpd/conf.d/fcgid.conf Code: # This is the Apache server configuration file for providing FastCGI support # through mod_fcgid # # Documentation is available at # http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html # Use FastCGI to process .fcg .fcgi & .fpl scripts AddHandler fcgid-script fcg fcgi fpl # Sane place to put sockets and shared memory file FcgidIPCDir /run/mod_fcgid FcgidProcessTableFile /run/mod_fcgid/fcgid_shm
So it appears that mod_fcgi is loaded. commenting out lines in ispconfig.vhost to get remove the internal error 500 issue. I found that if I removed Code: SetHandler fcgid-script results in output Code: uses('tpl'); $app->tpl->newTemplate('main.tpl.htm'); // tab change warning? // read misc config $app->uses('getconf'); $sys_config = $app->getconf->get_global_config('misc'); if($sys_config['tab_change_warning'] == 'y') { $app->tpl->setVar('tabchange_warning_enabled', 'y'); $app->tpl->setVar('global_tabchange_warning_txt', $app->lng('global_tabchange_warning_txt')); } else { $app->tpl->setVar('tabchange_warning_enabled', 'n'); } $app->tpl->setVar('tabchange_discard_enabled', $sys_config['tab_change_discard']); if($sys_config['tab_change_discard'] == 'y') { $app->tpl->setVar('global_tabchange_discard_txt', $app->lng('global_tabchange_discard_txt')); } if(isset($_SESSION['show_info_msg'])) { $app->tpl->setVar('show_info_msg', $_SESSION['show_info_msg']); unset($_SESSION['show_info_msg']); } if(isset($_SESSION['show_error_msg'])) { $app->tpl->setVar('show_error_msg', $_SESSION['show_error_msg']); unset($_SESSION['show_error_msg']); } // read js.d files $js_d = ISPC_WEB_PATH . '/js/js.d'; $js_d_files = array(); if(@is_dir($js_d)) { $dir = opendir($js_d); while($file = readdir($dir)) { $filename = $js_d . '/' . $file; if($file === '.' || $file === '..' || !is_file($filename)) continue; if(substr($file, -3) !== '.js') continue; $js_d_files[] = array('file' => $file); } closedir($dir); } if (!empty($js_d_files)) $app->tpl->setLoop('js_d_includes', $js_d_files); unset($js_d_files); $app->tpl_defaults(); $app->tpl->pparse(); ?> Could it be that the proxy_fcgi_module is competing with fcgid_module? Replaced sethandler line and commented out proxy_fcgi_module. Still still throws internal error. I am at a loss here. Why would SetHandler throw internal error?