I am trying to learn how to set up a (vps) hosting with apache2, php5, mysql, redis, mongodb, and whatever other dev tools.
I am going to practice this trought "Vagrant(up.com)". I want to use CentOS, but for now I am playing around in the default "box" wish is "Ubuntu 12.04".
Installing apache2 is not that diffecult and MySql is not as well. Put with setting up PHP proberly is another story.
I found one way of installing newer php version trough http://debphp.org/. Is this the only way? How do hosting company's solve this?
Now my real question. So I can install php5.4+, but what I would really like is having both 5.4 (default) and 5.5. I would like to enable PHP 5.5 trough a .htaccess file like I can with my current (shared) hosting.
For example:
# .htaccess
AddHandler application/x-httpd-php55 .php
I would like to do the same thing, but I don't know how. I have tried google, but I don't know what keywords to use. I tried a few, but without result(s).
Does anyone have a link or knows a book (doesn't have to be free) where I could find this? The only thing I found is: Conditional PHP Version in .htaccess. But the answer is to short to really understand what's happening.
FYI: I am no Linux Terminal expert (yet :) ) and I don't know much about apache2, but that doesn't mean I am not trying to learn it.
Edit: Actually, I am planning on using Nginx once I am ready to have my own VPS, so if people know a way off doing that on that program as well then feel free. Eventually I want to learn how to use/configure both anyways.