Custom apache directory - Centos 5.2

5 posts / 0 new
Last post
#1 Wed, 04/01/2009 - 04:12
olafskaug

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: [code:1] [root@virtue virtue]# suexec -V -D AP_DOC_ROOT="/home" -D AP_GID_MIN=100 -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_UID_MIN=500 -D AP_USERDIR_SUFFIX="public_html" [/code:1]

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.

Thu, 04/02/2009 - 01:50
olafskaug

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!

Thu, 04/02/2009 - 06:35 (Reply to #2)
ronald
ronald's picture

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.

Thu, 04/02/2009 - 11:11 (Reply to #3)
Joe
Joe's picture

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:

http://www.virtualmin.com/forums/help-home-for-newbies/suexec-is-the-onl...

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.

--

Check out the forum guidelines!

Fri, 04/03/2009 - 00:43
olafskaug

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.

Topic locked