HACKER Q&A
📣 KronisLV

Why is shared hosting only used with PHP?


While I personally run most of my software in VPSes, there is definitely something to be said about the ease of use of shared hosting, for when you need predictable and easy to manage environments for simple web apps or webpages.

Because of this, recently I started wondering about why only PHP has succeeded in this area, given that there are plenty of other tech stacks that could work in a similar configuration. Why are there seemingly no (or very few) options for the likes of Ruby, Python, .NET, Java or any other set of technologies?

Is it because they've traditionally been deployed as separte apps? What would prevent someone from offering shared Tomcat instances with some clever load balancing and routing added? Or is it because many of those are comparatively more heavyweight than the CGI-like approach of PHP? Or maybe it has something to do with them needing native dependencies in some cases (which I've seen for Ruby and PHP, thus necessitating certain other packages on the host as well)? Or perhaps it's more a sign of the times and there's not as much reason to attempt to enter the niche which PHP already covers, given the necessary engineering effort for getting somewhat secure shared hosting up and running?

Any thoughts?


  👤 onion2k Accepted Answer ✓
Back in the days of PHP 3 it was pretty easy to add PHP to a shared server with things like limits on memory usage and file access. That make it simple for hosts to offer it. They did offer things like Perl as well with mod_perl in Apache, and other languages through mod_cgi, but PHP was the popular one.

These days it's probably simpler to offer virtualized servers than shared hosting for anyone who wants to use something else, so there's no reason to change.


👤 Tabular-Iceberg
Isn’t shared PHP hosting just another form of PaaS?

I get the impression that companies like Heroku came about because the established shared hosting companies were too slow to adapt when Ruby on Rails exploded in popularity.


👤 thinkingemote
Dreamhost does Ruby and Python on their shared hosting.