Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lightweight development web server with support for PHP v2

In line with this question: Lightweight web app server for PHP?

The above question has been asked numerous times and answered exactly the same in all the cases I've found using google. My question is similar to a degree but with a different desired goal: On demand development instances.

I have come up with a somewhat questionable solution to host arbitrary directories in my user account for the purpose of development testing. I am not interested in custom vhosts but looking to emulate the behaviour I get when using paster or mongrel for Python & Ruby respectively.

Ubuntu 9.10 TOXIC@~/ >APACHE_RUN_USER=$USER APACHE_RUN_GROUP=www-data apache2 -d ~/Desktop/ -c "Listen 2990"

Is there a better solution, could I do something similar with nginix or lighttpd?

Note: The above won't work correctly for stock environments without a copied & altered httpd.conf.

Update: The ideal goal is to mimic Paster, Webbrick, and Mongrel for rapid local development hosting. For those light weight servers, it takes less then a minute to get a working instance running ( not factoring any DB support ). Apache2 vhost is great but I've been using Apache2 for over ten years and it would be some sort of abomination hack to setup a new entry in /etc/hosts unless you have your own DNS, in which case a wildcard subdomain setup would probably work great. EXCEPT one more problem, it's pretty easy for me to know what is being hosted ( ex. by paster or mongeral ) just doing a sudo netstat -tulpn while there would be a good possibility of confusion in figure out which vhost is what.

like image 411
David Avatar asked Mar 27 '26 00:03

David


1 Answers

Have you looked at nanoweb? It looks like it might fit your requirements:

  1. Written in php, so once its up and running, serving pages should be pretty fast
  2. Can be installed and run from a user's home directory

Note: I haven't tried it myself, I'm pretty happy using apache, but I thought I'd pass the info along

like image 99
Chris Gow Avatar answered Mar 28 '26 15:03

Chris Gow