Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Putting Apache in Jail (including PHP)
Jan 31, 2008 @ 12:51:00

In a new article on DevShed, the spotlight is on putting Apache "in jail" with chroot, but they also include a section on setting up PHP to work inside it.

In this conclusion to a six-part series on Apache configuration and installation, you will learn how to use chroot to put Apache in jail, how to prepare PHP to work in jail, and more.

The article is an excerpt from the O'Reilly book "Apache Security" and shows how to get PHP to cooperate by installing it normally and then setting up some shared libraries to be used in the jail. They note one common problem - an issue with PHP accessing sendmail - that can be solved easily with a change to php.ini for the setup.

tagged: apache chroot jail install oreilly book security