Apache and Nginx

On my server, on which I offer web hosting for some of my customers, runs an Apache 2. I remember when I switched from Apache 1 to Apache 2 (back in 2006?), seemed like a hugh for humanity to me. So much more modular, and easier to configure.

Now a little more than two years ago I finally made the transition from the classic PHP-module to php fastcgi, which brought a lot of stability and solved many permission problems on my multi-site environment.

BUT: apache seems to be very resource hungry, especially when using PHP as fastcgi. So I was thinking about switching over to something like nginx or lighttpd, which have a different structure, and they’re just not httpd grandpas. Young and fresh they seem.

Over the last weeks, I had nginx running as a reverse proxy for IPv6 requests, since my customer panel froxlor, is not yet supporting having an IPv4 and IPv6 line for each vhost. And that worked like a charm. I loved the setup, nice and clean, and I was thinking about making a switch, when I found out, that nginx cannot spawn php-cgi threads. On a single-site server, that is perfectly fine, but in a multihost environment, where every user’s scripts execute as their owner, quite impossible. It would mean running a php-cgi thread for every single customer all of the time (even if they don’t have a single php file in their host). Okay byebye Nginx. I will keep you for the time being, until I have native multistack IPv4/IPv6 support in my control panel, but then I will probably give lighttpd another try.

Lighttpd is supposed to offer all of the above and be less memory hungry than the indian. But we’ll see about that. Good night now.

Last update for today: Actually looking at the stats, my servers RAM is usually more than 50% free. Maybe I should not worry about the web server for another year or two.

Leave a Reply

Your email address will not be published. Required fields are marked *