4 ms·
My number 1 tip: ditch Apache. One of my web apps has the occasional spike in traffic that previously caused Apache to consume vast amounts of memory on my VPS
by mootothemax 16y ago
My number 1 tip: ditch Apache.
One of my web apps has the occasional spike in traffic that previously caused Apache to consume vast amounts of memory on my VPS, eventually crashing it due to lack of memory.
After reading many guides, experimenting, and generally getting quite frustrated (and working out what VPSs I could afford to upgrade to), I tried setting up Nginx on a separate port. It took maybe 1 hours for me to have my former LAMP stack set up and working, so I put it live, and haven't looked back since.
If you're on a VPS, use Nginx. The config file is wildly different to that of Apache, and you'll no doubt spend a few minutes cursing trying to figure out how to port over your rewrite rules, but after that it's plain sailing.
- adambard 16y agoThis. As an added bonus, I've also found that I prefer Nginx's configuration files. Worst case, you can serve static files with Nginx and route dynamic requests to your Apache instance (I still do this with a few old PHP apps I have).