[Cialug] Lightweight webserver for local php dev

Eric Junker eric at eric.nu
Mon Aug 1 15:27:20 CDT 2011


On 8/1/2011 3:01 PM, Matthew Nuzum wrote:
> My team works on numerous projects for internal company use. Many of
> them are Python/Django projects and we can test them locally with
> Python's built in web server just by running ./manage.py runserver in
> the project's root and then visiting http://localhost:8000/ in your browser.
>
> Is there something like this for PHP?

PHP 5.4 will have that.
http://php.net/manual/en/features.commandline.webserver.php

There is also some good discussion of this on Hacker News.
http://news.ycombinator.com/item?id=2281724

My concern would be that you would run into issues if your website 
depended on things like mod_rewrite or expecting to be served from a 
specific domain. You could get somewhat automated if you wrote a script 
to modify your hosts file and also create virtual hosts entries.

Eric



More information about the Cialug mailing list