Why I gave apache a second chance

I decided to switch to NGINX about a month ago. Two days ago, I switched back to give apache a second chance.

Why I switched

The primary reason I made the switch to NGINX was because my VPS kept crashing, and I couldn’t figure out why. I tried all sorts of fixes for apache, and nothing worked, so I switched. This did reduce the frequency of the crashing. but the frequency was an indirect result. The reason my VPS was crashing was because I was using encrypted swap, which I disabled and changed to regular swap. Although this does put a slight risk that a password stored in RAM will be swapped out, I doubt anyone will break into a datacenter, and run away with a server at the exact time a password is in the swapfile. I trust that Vultr has put reasonable effort into making stealing their expensive servers hard :). Anyways, because NGINX used less RAM, it kind of reduced the problem. Now, after I fixed the issue, it’s time to give Apache another chance.

.htaccess files

WordPress plugins live off the htaccess file, that is a feature that only apache has(there is another solution with htaccess support, but apache is the only free one). htaccess files decrease the performance, so I created a compromise with:

<Directory /var/www/nerdoflinux>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
        Include /var/www/nerdoflinux/.htaccess

which sort of helps with speed, and supports the .htaccess file that many plugins use.


If something goes wrong, it’s easier(in my opinion) to fix problems with apache. This is in part due to the large community apache has because it’s been around for so much longer than NGINX.

Now, if I had a powerful enough server(or multiple servers) I would use NGINX and apache, NGINX would serve cached,static files, and apache would handle PHP, allowing .htaccess support, and the speed of NGINX.

(Maybe)Related posts:

Leave a Reply

1 Comment on "Why I gave apache a second chance"

Notify of

I’m actually currently testing AllowOverride All because of WordFence and WP Super Cache. If it causes performance issues, I’ll change back