Bug 86002

Summary: Can't actually set apache2 SUEXEC_DOCROOT
Product: Ports & Packages Reporter: Bryan Fullerton <fehwalker>
Component: Individual Port(s)Assignee: Clement Laforet <clement>
Status: Closed FIXED    
Severity: Affects Only Me CC: clement
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Bryan Fullerton 2005-09-12 03:10:19 UTC
When the apache2 port is compiled with SUEXEC and SUEXEC_DOCROOT defines, the suexec binary is still compiled with the default Apache docroot AP_DOC_ROOT (defined as /usr/local/www in the port).

This is not a new problem, it's been there for at least the past 2 months (wasn't using suexec before that).

Fix: 

I'm sure it's somewhere in the Makefiles, but I don't have the time now to sort through them.

For now I'm manually hacking suexec.h with a fake AP_DOC_ROOT and recompiling in the work directory. Obviously this is less than ideal.
How-To-Repeat: 
st02.bryanf:/usr/ports/www/apache2> make -DWITH_SUEXEC -DSUEXEC_DOCROOT=/vws
[... compiling, no errors ...]

st02.bryanf:/usr/ports/www/apache2> sudo work/httpd-2.0.54/support/suexec -V
 -D AP_DOC_ROOT="/usr/local/www/data"
 -D AP_GID_MIN=1000
 -D AP_HTTPD_USER="www"
 -D AP_LOG_EXEC="/var/log/httpd-suexec.log"
 -D AP_SAFE_PATH="/usr/local/bin:/usr/local/bin:/usr/bin:/bin"
 -D AP_UID_MIN=1000
 -D AP_USERDIR_SUFFIX="public_html"
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2005-09-12 05:56:01 UTC
Responsible Changed
From-To: freebsd-ports-bugs->clement

Over to maintainer.
Comment 2 Clement Laforet freebsd_committer freebsd_triage 2005-09-12 08:25:36 UTC
State Changed
From-To: open->closed

Hi Bryan, 

you misused -D flags actually. 
> make -DWITH_SUEXEC -DSUEXEC_DOCROOT=/vws 
^^^^ 
What you have defined is: 
${WITH_SUEXEC} = 1 
${SUEXEC_DOCROOT=/vws} = 1 
It's definitly not what you want. 
Try: 
make -DWITH_SUEXEC SUEXEC_DOCROOT=/vws and it will work. 

regards, 
clem