# Changing Apache2 SuExec document root



## tad1214 (Jul 8, 2009)

Hi,

I am not very familiar with passing options to make with the FreeBSD ports setup. When I compile Apache from source I just add


```
--with-suexec-docroot=/home
```

To my make statement, how do I do this with ports?

Thanks!
-=Tom


----------



## anomie (Jul 9, 2009)

```
%cd /usr/ports/www/apache22 && grep -i 'suexec.*docroot' *
Makefile.doc:##            SUEXEC_DOCROOT:     SuExec root directory
```

So, read through Makefile.doc there. The option you want appears to be available.


----------



## tad1214 (Jul 9, 2009)

Hmm maybe I'm doing it wrong?


```
[2009-07-09 21:16:03]: cannot get docroot information (/usr/local/www/data)
```

after a 


```
# make SUEXEC_DOCROOT="/usr/home"
# make deinstall
# make install
```

Seems to be no luck still.


----------



## anomie (Jul 9, 2009)

Perhaps try:
`# make WITH_SUEXEC_DOCROOT='/foo'`

Also be sure to enable the mod_suexec option. If that doesn't work, I'll try to actually build it.


----------



## tad1214 (Jul 9, 2009)

Hmm still nothing


```
cd support && make suexec
`suexec' is up to date.
```

This makes me think it doesnt see it or its the same as last time with the regular SUEXEC_DOCROOT="/foo"


```
[2009-07-09 23:57:23]: cannot get docroot information (/usr/local/www/data)
```

From everything I searched, I am barking up the right tree with this error too.


----------



## anomie (Jul 10, 2009)

One more slightly modified stab from me: 
`# make WITH_SUEXEC=yes SUEXEC_DOCROOT='/foo'`

(I had intended to tinker with this until I figured out the precise invocation the port was looking for, but that's not going to be possible on my test box at the moment - apologies.)


----------



## MarS (Jul 10, 2009)

Try to put

```
SUEXEC_DOCROOT=/home
```

in your /etc/make.conf and recompile Apache. At least, this has always worked for me.


----------



## tad1214 (Jul 10, 2009)

I put

```
WITH_SUEXEC=yes
SUEXEC_DOCROOT="/home"
```

and rebuild the port and it worked successfully.

Thanks!!!!!!


----------

