I am going to host a few small sites on VPS, and each of them are going to run my own custom PHP scripts. I am fairly certain that they are secure (did everything in the book, plus some of which is not in the book) to make sure they can't be exploited. But just to be safe I want to know how I could secure each of the virtual hosts so that they can't escape from there virtual host (if a hacker uploaded a shell they could not go above the www folder a legitimate user can't do in ftp no matter how many times they click ..) folder on Debian and Apache.
- Use Suhosin and configure it appropriately.
- Use SuPHP to run each script in a different user context. Bonus points for
chrooting the scripts, but that means a lot of management overhead for creating and maintaining the
- Read the Securing Debian Manual and configure your system accordingly.