Ideal Multi-Developer Lamp Stack? Ideal Multi-Developer Lamp Stack? apache apache

Ideal Multi-Developer Lamp Stack?


OK, the way we were running development LAMP setup at my previous job, was like this. A single server running both MySQL and Apache. Each developer is assigned an IP address on the server (the machine is running multiple IPs on the same interface, all IPs are on the same subnet), so each developer can have at least one IP-based virtual host and as many name based as they want (our web site used SSL, so we needed separate IPs, wigthout SSL, you can get away with a single IP and name based vhosts). We had local DNS server serving wildcard A records for each developer in this manner *.john.dev.company IN A 10.1.1.123, where 10.1.1.123 was IP address assigned to John. This way John could define as many name based vhosts as he wanted and they would all get resolved correctly as long as they all ended in john.dev.company (like project1.john.dev.company). Each developer had their own apache config file with their virtual hosts in it and we used Include directive to pull all these files into the main Apache config. The permissions were set, so these config files would be editable by respective developers and each developer had a soft link to their config in their home directory. Also, every developer was allowed to use sudo to restart Apache. The downside of this setup was that once in a while a particular dev would crash entire server by screwing up their config file. We used common database, since everyone was working on a single project, but it shouldn't be difficult to setup multiple individual databases.


My take on the issue, i don't think it covers all of your requirements, but it's pretty close:

  • Have a CentOS server with LAMP stack ( yum install apache2 mysql php etc. ) - or 2 servers one httpd and one mysqld
  • For n developers have n folders with n virtual hosts www.developer-n.com on the host that runst the Apache server
  • Each developer mounts it's server folder (say //192.168.0.1/home/developer-n/www) on the local machine via CIFS in the local-station's /etc/fstab and edits the files from local machine yet runs them on the (unique) server
  • Each developer mini-environment is tweaked via .htaccess