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'
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
- Chris.
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
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