You are not logged in.

#1 2008-10-15 12:25:15

Runef
Member
Registered: 2008-10-15
Posts: 4

running lighttpd in a chrooted environment

Hey all.

Last sunday I read in a magazine about archlinux, and I got interested.
So I installed it on one of my homeservers and I'm toying around with it.
Having experience with several linux distro's and even several unices from both a personal and professional pov, Arch pleasantly surprised me with it's simplicity and userfriendliness.

I've set up a simple lighttpd setup with php-cgi, fastcgi and postgresql. (again, pleasantly surprised to have it all up and running in a matter of minutes)
Now I'm wondering if there's a relatively simple way of having the webserver run in a chroot jail.
I'm a big fan of having services that listen to the big bad internet run in their private jail.

My aim is to have everything running from the standard pacman repositories, meaning, I don't want to compile custom packages or add obscure repo's.

Does anyone have any experience with running lighttpd in a jail, and also, does anyone have any experience with running it in a chroot package available in the default pacman repo's?

Thanks.

Offline

#2 2008-10-15 15:01:40

Runef
Member
Registered: 2008-10-15
Posts: 4

Re: running lighttpd in a chrooted environment

Solved it myself.

Made a little script (mkjail.sh:10 lines) that copies all the needed libs (ldd) of a binary or library to a directory.
So now I can launch lighttpd from a jail.
Just need to do a little scripting to alter the rc.d start/stop script.

installed the lighttpd binary suid http:http which lauches the whole stuff as http.
Little glitch; can't get php-cgi to do the same.

But so far, everything works fine.

Offline

Board footer

Powered by FluxBB