(Disclaimer: I have no experience with
lxc as suggested in the comment)
I would like to emulate like if each one would be in their own server.
Personally, I'd give them their own (virtual) server just using OpenVZ. It's really simple to install, and you can get a lightweight GUI client for it if you need one.
The idea would be you create a single template which you then deploy to each user who gets their own server. They'd be able to have
root inside their virtual machine, but this would be completely isolated to just their machine. It'll simulate perfectly what would happen if they had their own (dedicated) server, and the beauty of this is you can use the tools provided (such as
vzmigrate) to migrate their machine over a new host if they need more resources (RAM, Disk, etc) - without having to reinstall a single thing. The overhead of OpenVZ is minimal, so it's not uncommon to have one dedicated host with just a single OpenVZ VM due to that portability.
The other advantage is because they have
root, they can go ahead and install whatever software they like in their container, since some developers may need a different version of PHP or Apache, custom Apache modules, or just some other server-side software for their development work.