I wish to run PHP and Erlang on a web server. Apache is ruled out, because the backend Erlang process would need to handle around 3000 requests concurrently. So definitely something with a smaller memory footprint like lighttpd...
Which one would you recommend? And why?
Erlang has built-in web server:
http://yaws.hyber.org/
Which you can use. It is supposed to be really really fast.
If you want to expose Erlang to the web, Yaws is the way to go (in just learning Erlang, so this may be incorrect)
edit:
After digging around a bit, I found that the Erlang webserver (Yaws) CAN run PHP scripts. So your answer is an Erlang webserver!
http://yaws.hyber.org/cgi.yaws
Its hard to answer this one without more information. What is it you wish to use erlang and php for? Is php your frontend for a backend erlang process? Or is erlang going to do some of the frontend also?
I've seen folks do well with nginx in front of erlang and fastcgi. You could run the php through fastcgi with nginx doing the forwarding. Without more information it would be hard to say more than that.
Run your php frontend with anything you like (apache i hope) and communicate with your erlang as a backend.
Read:
http://www.erlang-factory.com/upload/presentations/117/Todd-Lipcon-ErlangFactoryLondon2009-BuildingMulti-LanguageWebArchitecturesusingErlangandThrift.pdf
Basically talks how to run a php frontend, because it is good at strings and template designers 'get it' with a erlang backend because it is good at concurrency, etc. Then he glue it all together with thrifty
best quote
Where PHP sucks is where Erlang
excels!
I And vice versa!