Apache directory structure with multiple hosted languages.

Posted by anomareh on Super User See other posts from Super User or by anomareh
Published on 2011-02-22T07:04:52Z Indexed on 2011/02/22 7:27 UTC
Read the original article Hit count: 535

I just got a new work machine up and running and I'm trying to decide on how to set everything up directory wise. I've done some digging around and really haven't been able to find anything conclusive. I know it's a question with a variety of answers but I'm hoping there's some sort of general guidelines or best practices to go by.

With that said, here are a few things specific to my situation.

  • I will be doing actual development and testing on the same machine as the server. It is a single user machine in the sense that I will be the only one working on the machine.

  • There will be multiple hosted languages, specifically PHP and RoR while possibly expanding later.

  • I'd like the setup to translate well to a production environment.

With those 3 things in mind there are a couple of things I've had in the back of mind.

  • Seeing as it's a single user machine I haven't been able to decide whether or not I should be working on things out of my home directory or if they should be located outside of it. I'm feeling that outside of a user directory would be better as it would translate better to a production environment, but I'm also not sure if that will come with any permission annoyances or concerns seeing as I'll be working on the same machine.

  • Hosting multiple languages seems like it may be a bit quirky. With PHP I've found you're generally just dumping the project somewhere in the document root where as something like a Rails app you have the entire project and you only want the public directory in the document root.

Thanks for any insight, opinion, or just personal preference from experience anyone can offer.

© Super User or respective owner

Related posts about linux

Related posts about apache