Hey, that’s weird, I ran rpm --import the http url i posted above, which didn’t output anything back so i thought it worked. Then installed the fcgid successfully, but now you posted that file contents i decided to check and it’s not even there. No file at all in /etc/pki/rpm-gpg hmm
well i guess it worked, but it’s strange. searched elsewhere couldn’t find it.
Ok, so i didn’t do much… I disabled loading mod_php in /etc/httpd/conf.d/php.conf
I noticed there was already a fcgid.conf which was setup correctly i don’t know if that file was already there or not but i didn’t need to change anything.
After restarting apache sites now no longer repond. (continuous loading indicator even minutes later)…
i also checked server templates > apache and couldn’t find the default php mode directive (to set fcgid)
I’ve now added the fcgi-bin directory in the user home dir and added the .fcgi file, also added /etc/php5/php.ini to home dir… (copy of normal php.ini)
ok, i ofcourse had to put those lines in <directory> after i did that we’re one step further. now i receive internal server errors but at least it’s getting to mod_fcgid
[Tue Dec 16 11:30:13 2008] [notice] mod_fcgid: process /home/example/public_html/index.php(3347) exit(server exited), terminated by calling exit(), return code: 255
[Tue Dec 16 11:30:19 2008] [notice] mod_fcgid: process /home/example/public_html/index.php(3354) exit(communication error), terminated by calling exit(), return code: 255
And also this: [Tue Dec 16 11:43:33 2008] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
[Tue Dec 16 11:43:33 2008] [error] [client 78.21.x.x] Premature end of script headers: wp-config.php
(this is in the home dir, the others are in /var/log/httpd/error_log)
I’ve also now updated my other packages; httpd, httpd_devel, mod_ssl to use virtualmin repos as the docroot for suexec was previously var/www, but this is now correctly pointed to /home
however, none of the errors are fixed by doing this (i don’t even have suexec enabled yet)
[Tue Dec 16 12:15:43 2008] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
[Tue Dec 16 12:15:43 2008] [error] [client 78.21.x.x] Premature end of script headers: wp-config.php
But now, every .php file i access returns a forbidden error, yet here is my home dir, seems to be set up ok?
drwxr-xr-x 2 example example 4.0K Dec 16 10:32 cgi-bin
drwxr-xr-x 3 example example 4.0K Dec 16 12:18 etc
drwxr-xr-x 2 example example 4.0K Dec 16 11:00 fcgi-bin
drwxr-xr-x 2 example example 4.0K Dec 7 14:42 homes
drwxr-x— 2 example example 4.0K Dec 14 04:02 logs
drwx------ 6 example example 4.0K Dec 15 11:18 mail
drwxr-x— 5 example example 4.0K Dec 16 10:38 public_html
Also, these are some errors from suexec.log:
[2008-12-16 13:22:45]: uid: (501/example) gid: (502/502) cmd: php5.fcgi
[2008-12-16 13:22:45]: file has no execute permission: (/home/example/fcgi-bin/php5.fcgi)
But these are old, I no longer get these errors… i did not add +x to the php5.fcgi, do i need to add this?
Btw, I installed webmin via RPM, did that not execute the install.sh? I had already yum installed httpd etc beforehand.. But did not know that there was an install.sh
How far along are you in getting things running on your system? If you don’t have any Virtualmin virtual hosts setup yet, you probably do want to run install.sh. Manual installation of a full-featured virtual hosting system is extremely intimidating, even for experienced administrators. It’s also very time consuming.
If you have already setup virtual hosts and the system is in production, then you’ll have to go the manual route.
First step would be installing the virtualmin-release package, so yum can install packages from our repository (you obviously can’t install packages from a repository that yum doesn’t know about, which is why “yum install mod_fcgid” doesn’t work for you!).
The CentOS 5 release package can be installed like this:
i did not add +x to the php5.fcgi, do i need to add this?
Of course. You want it to execute, don’t you?
Also check to be sure the PHP paths in your php5.fcgi wrapper are correct for your system. The php-cgi binary is often called by different names on different distros. On CentOS, it’s just “php” I think, though maybe it’s also callable as php-cgi. I dunno. Obviously if you have the path wrong, it will not work.
The Webmin site is getting an overhaul as we speak, though, so there soon won’t be a separate Virtualmin page at Webmin.com–it’ll simply link to appropriate docs and information at Virtualmin.com.
I already installed httpd, mod_fcgid, mod_ssl, httpd_devel from your release packages. I’ve added the +x to the fcgi file but I’m still getting the 403 forbidden error… (suexec i assume)
About reinstalling it, will that overwrite all config files? e.g. also for dovecot, etc? Really wish there was some kind of config check instead
About reinstalling it, will that overwrite all config files?
It will modify many config files. And, since this is a GPL installation, it won’t fix this particular problem (because mod_fcgid support is not part of GPL…it is being done outside of the control of Virtualmin, in this case).
What’s in your suexec_log when you make a request? And the error_log (both the system-wide one in /var/log/httpd and the one for the virtual server in /home/domainname/logs)?
Is suexec pointing to the right place for the docroot? You can make sure with:
/usr/sbin/suexec -V
It should have AP_DOC_ROOT set to “/home”. Since you’ve installed our httpd package, this should be true…but just to make sure.
I haven’t had any new entries in /var/log/httpd/error_log or /var/log/httpd/suexec.log or /home/example/logs/error_log since yesterday, only thing is in the access_log where it just says that status code 403 was returned.
78.21.xx.xx - - [17/Dec/2008:03:13:37 -0600] "GET / HTTP/1.1" 403 182 "-" "Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_5_5; nl-nl) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1"