Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

chrooting apache at boot

Status
Not open for further replies.

blakey2

MIS
Jan 28, 2004
313
AU
Hi all,

I'm setting up a apache 2.x http server on Debian (sarge) Linux.

I want to chroot apache and have read alot of info on doing this. I am comfortable in setting up the chroot, but I want/need to know how/when to call the 'chroot' command.

Particularly, if for some reason the webserver reboots at night (power failure etc.) I would like to have apache (apachectl) restart the webserver when it reboots (power kicks back in).
I can do this fine by copying my 'apachectl' file into my /etc/init.d directory and running 'update-rc.d'
Code:
    /etc/init.d# update-rc.d apachectl default
BUT what if I chroot apache?? - I want apache to restart in a chroot.

I suppose I could edit the 'apachectl' script to call 'chroot'. If I did this however, the server would always load chrooted apache.
Is this what I should do?? - Is there a better/cleaner way??

This sounds like (another?) really dumb question, and I think that it is.... (i'll ask anyway tho)...
--> If apache is chrooted, then I can still access bash (log into shell normally??)? It won't log me in (on the webserver) to the chrooted environment?? The chrooted environment only exists for apache and for anyone connecting to apache??

Apologies for the ramble, I think I have cleared up in my head how it should all fit together, but please confirm either way.

Thanks alot :D - Chris.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top