FreeBSD 6.3 problem

8 posts / 0 new
Last post
#1 Sat, 02/16/2008 - 15:38
rulez22

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!

Mon, 02/18/2008 - 12:37
Joe
Joe's picture

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.)

--

Check out the forum guidelines!

Mon, 02/18/2008 - 13:20 (Reply to #2)
rulez22

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 =)

Tue, 02/19/2008 - 01:26 (Reply to #3)
Lucian

<b>Joe wrote:</b>
<div class='quote'>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.)</div>

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

Tue, 02/19/2008 - 06:52 (Reply to #4)
rulez22

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

Tue, 02/19/2008 - 01:17
Lucian

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).

Wed, 02/20/2008 - 14:33
rulez22

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

Sun, 02/24/2008 - 17:44 (Reply to #7)
David.Strejc

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

Topic locked