Sometimes when migrating sites are switching between mod_php and FCGId permissions can get mangled which cause errors such as:
(104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
when running in FCGId mode.
I found a solution to be ass follows.
Go to /home/sitename/fcgi-bin
Use the follpwoing command to reset the immutable flag
“chattr -i php5.fcgi”
Then delete the /home/sitename/etc and /home/sitename/fcgi-bin directories (making sure that anything that’s not php related in etc is saved)
Using virtualmin switch back to apache mod_php mode and then back to FCGId mode. The site should now work
Dont forget to chown any files/directories in public_html that were apache to : Note that these are both usually the sitename.
Hope this helps
@tazzydemon, sorry, i’m new user in virtualmin,
I hope you explaint us more detil about step number 4.
may be some screenshot ?
Thanks in advance
I have similar symptom when upgrade from php 5.3 to 5.4. All pages are blank. Many thank tazzydemon, you save my life!
I know it’s late, anjjriit but for anybody else need in step 4:
- Open virtualmin administrator page.
- Select domain you want to change configuration’s parameter.
- Click “Server Configuration”
- Click “Website Options”
Had some strange Apache errors with OwnCloud RPC, no more now
Created an account on virtualmin.com just now, just to thank you.
I can see that this fix has worked for people eve for the last person which is very recent.
I have two sites both on separate accounts on virtualmin. Both had the same problem, but one of them started working( I don’t know how because I kept trying a bunch of things and then I left it came back and was working).
The second site that uses the same CMS does not seem to work, even the method stated here is not working.
Does anyone know if there was a way to debug this to find out more?
Anyway help will be much appreciated!
I gave up and started from scratch, reinstalling the OS and virtualmin.
It turned out a script that was sending email via SMTP was causing the issue.
Let’s just hope the problem isn’t lingering.
Webmin > servers > apache web server > choose the server with the problem > users and groups > and than “Run CGI programs as -User from global configuration-” and save.
after virtualmin-base reinstall i have changed configuration file:
my html root directory is not /home/user but /var/www/user
that was the reason why I got this error message.
This always happen after restore backup from other server… that have diferent uids
Webmin > servers > apache web server > choose the server with the problem > users and groups
See if the user number (UID) and Group number (GID) are correct .
To check it, login by ssh and do this command:
This solves the issue
Thanks for the solution.
Can you explain what causes this at all?
@birhost and @cyborgas Thanks folks. This saved my day.
That doesn’t works for php 7.
The status of your system is being checked to ensure that all enabled features are available, that the mail server is properly configured, and that quotas are active ..
Your system has 993.86 MB of memory, which is at or above the Virtualmin recommended minimum of 256 MB.
Apache is installed.
The following PHP versions are available : 5.5.9 (/usr/bin/php5-cgi), 7.0.10 (/usr/bin/php7.0)
Webalizer is installed.
Apache is configured to host SSL websites.
MySQL is installed and running.
Logrotate is installed.
Plugin AWstats reporting is installed OK.
Plugin Protected web directories is installed OK.
Using network interface eth0 for virtual IPs.
IPv6 addresses are available, using interface eth0.
Default IPv4 address for virtual servers is 188.8.131.52.
Default IPv6 address for virtual servers is 2001:19f0:300:2b01::64.
Default IP address is set to 184.108.40.206, which matches the detected external address.
Both user and group quotas are enabled for home and email directories.
All commands needed to create and restore backups are installed.
The selected package management and update systems are installed OK.
… your system is ready for use by Virtualmin.
The actual problem (in my case) is that Virtualmin installs their own version of /usr/sbin/suexec with the little known “capability” attribute. This attribute was no longer set after restoring to a new server.
You can view capability attribute as follows:
It should return:
/usr/sbin/suexec = cap_setgid,cap_setuid+ep
To set that:
setcap cap_setgid,cap_setuid+ep /usr/sbin/suexec
Alternatively you can simply reinstall it by reinstalling virtualmins httpd RPM
yum reinstall httpd
You can also just change the permission of the file although probably not quite as secure.
chmod 4755 /usr/sbin/suexec
In case of php 5.6+ and/or using multiple php versions (ie: php 5.3 and php 7), be also sure to turn off register_globals
Thanks, this worked for me! I had a server restart that gave me this error on 3 out of 4 sites.
I had one site that was working without this change, and three others that only worked after this change.
Can anyone explain what this does, and why the old configuration stopped working?