Reputation: 657
Could you help me to choose a webserver. I would like to change my Apache installation on a cloud server. I'm using PHP, Node.js and maybe one day Python.
Which one of Apache, Ligthttpd and nginx is the simplest to configure for my use ?
Thanks.
Upvotes: 3
Views: 3210
Reputation: 4395
If you intend to run Node.js alongside PHP on the same platform, I would suggest looking into using nginx as a reverse proxy.
There are several advantages to this setup..
Although nginx is fully capable of handling php requests via fastcgi, but Apache + mod_php is simpler to configure in my personal opinion.
EngineX is superb at serving static files, it requires far less memory than Apache thus allowing you to rely on Apache only for dynamic PHP requests.
Provided you are running some flavor of linux, you can install both Apache and nginx through a package manager and avoid dealing with source unless you want to.
Node.js can run as an upstream server through nginx so you would be able to run all 3 servers at the same time.
I have never tried implementing Python via nginx so I have no experience with it, but given how efficient nginx as a reverse proxy, you can throw a Python server on a different port and simply add another upstream server to your nginx configuration with barely any effort.
Upvotes: 6