Custom apache directory - Centos 5.2

Could someone help me understand how to recompile httpd with mod_fcgi with a custom docroot?

Currently the output from suexec -v is:

[root@virtue virtue]# suexec -V
-D AP_DOC_ROOT="/home"
-D AP_HTTPD_USER="apache"
-D AP_LOG_EXEC="/var/log/httpd/suexec.log"
-D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
-D AP_USERDIR_SUFFIX="public_html"

I would love to change the AP_DOC_ROOT to be “/var/virtual”.
My understanding is that I need to recompil apache with the correct ./config options.
Tried reading about it on different sites, but everyone described a different approach. Also looked at a few posts here, but didn’t really get it.

Any help would be greatly appreciated.

Since there was no reply here I gave it a whirl using steps i found in another forum.
It explained getting the rpm of httpd and changing suexec_docroot and contendir.
Changed them to /var/virtual and did an rpm-build. Then i rpm2cpio’ed suexec to /usr/sbin/suexec, but when i ran suexec -V it still points to /home.

Any pointers would be greatly appreciated!

would /home/virtual or /home/var/virtual not easier to set up? I recall this can be done in the virtualmin UI
Is there an explicit reason to get it under /var?

And I wouldn’t be sure how to recompile with a different path.

I’ve actually documented rebuilding the SRPM a few times in the past here in the forums. Searching for “rebuild srpm suexec” brought it right up:

It’s quite old, so you’ll need to make sure you get the most recent version of the SRPM. But, the steps haven’t changed.

Thanks for all the help, guys!

Seems i did it correctly the first times arround though. I only messed up the extraction and copying of suexec.