I would like to run a web hosting service on a Raspberry Pi. It's for a course in web development for senior high school students. They should be able to log in and upload files via SSH to their own account, but should not be able to access other students' files or directories, unless they make them public via chmod. They should have access to PHP, and MySQL, at least one separate database for each student. It would be great if the web hosting service had similar features as http://one.com/ , but it doesn't need e-mail. It is enough if it can be administrated by me using scripts (in Bash, Perl, Python, PHP, Node, or any other language), although an additional web GUI is no disadvantage. It would preferably run on Raspbian (Lubuntu 16.04 would also be OK), because it's what I'm most used to, and be installed using a script or deb-file.
It should be secure so that students or others can't hack it or cheat by looking at other students' solutions. I intend to run the web hosting service from home and it would be shut off when the students should sleep, and I could back up then automatically to a USB flash drive. It's also useful to see the progression of the students' works, by studying the backups. Backups could possibly be done using Git.
The course has about 30 students. Each student should have a quota so that not one student fills up the SD-card. It's just for teaching purposes, so they don't need to upload a lot of data.
On an earlier course I used one USB flash drive for each student with XAMPP. A Raspberry Pi Zero for each student is a possibility, but it's too expensive now. The course is not about installing LAMP in Mac OS X, so it should be easy to use for the students. Maybe the students doesn't have rights to install LAMP on their Mac.
Does anyone know about such a system?