FreeBSD 6.3 problem

first of all installation of Webmin+VM looks very simple until i got to the point where i have to install Apache.
Like all other packages I’ve installed it through “pkg_add apache-2.2.6_2.tbz” and there is couple of error messages appeared (not a big deal, it was trying to copy sample pages to a folder that didn’t exist, anyway not a good thing to see precompiled port on official BSD site that has errors), ok I installed that apache port, changed paths in “Module Config” in Virtualmin and now I see this message “Suexec is enabled in the default template, but the Apache module mod_suexec is not installed or not enabled”
What is the best way to fix it and which is the best precompiled tbz apache package for freebsd to use with virtualmin?
Thanks!

Apache is where things get tricky on all platforms. You probably can’t use a precompiled package…suexec must have suexec docroot set to /home for sane use with Virtualmin, and as far as I know, none of the popular platforms have this compiled into their binaries of suexec. (Most systems have the docroot set to /var/www, or similar, which is fine for a single administrator system, but nonsensical for shared virtual hosting for many users, since users live in /home.)

Thanks for your reply Joe!
So what is the solution after I downloaded httpd-2.2.8.tar.gz (latest one), what should I include in compilation line in console to have suexec? Also I want to have as many modules as possible (mysql support, cgi, etc.)? Before I starts would be interesting to know how to do it the perfect way - hate doing things twice =)

It’s nicer to use the ports system, especially if you want to keep your system up2date with portupgrade. Here’s how i build my apache on freebsd (for virtualmin usage):
cd /usr/ports/www/apache22
make WITH_AUTH_MODULES=yes WITH_DAV_MODULES=yes WITH_PROXY_MODULES=yes WITH_SSL_MODULES=yes WITH_SUEXEC=yes SUEXEC_DOCROOT=/home install clean
(on recent versions of ports a ncurses dialog may apear asking you what modules you want to enable, choose carefully).

Joe wrote:

Apache is where things get tricky on all platforms. You probably can't use a precompiled package...suexec must have suexec docroot set to /home for sane use with Virtualmin, and as far as I know, none of the popular platforms have this compiled into their binaries of suexec. (Most systems have the docroot set to /var/www, or similar, which is fine for a single administrator system, but nonsensical for shared virtual hosting for many users, since users live in /home.)

To work around that stupid setting I did a mount --bind /var/www/home /home
all seems to be working fine: virtualmin, suexec etc.

erm, it looks like this is linux command
“mount --bind /var/www/home /home”
it doesnt work in FreeBSD, says “illegal option --”
and i don’t see “bind” option at all in “man mount”
Please advice.

Damn, after a bit of research I found that equivalent for that line for FreeBSD is “mount -t nullfs /var/www/home /home”
Which I’ve done, but now I’ve lost my user in ~home
One question - what was the purpose for that command? To mount “/var/www/home” in to “/home”?
Is “/var/www/home” on your system is where all websites are?
After default Apache compulation with all modules that folder is located here “/usr/local/www/apache22/data”
PLease help!

My advise (as I am running BSD for 5 years) is this.

Undo everything you’ve done in this way (since it is not problem of this kind ;o)

Do exactly this in you favorite shell (command line) as root.

portsnap fetch
(this command will fetch ports tree in /usr/ports)

portsnap update
(it will update your ports tree)

cd /usr/ports/www/apache22
make install
(after this command you will be able to choose suexec in compilation options - and you can choose other options too - but it is not neccessary)

and that is it