Woocommerce: Apache or Nginx?
Edit: Apache OR Nginx? Could someone fix my title - I posted without proofing.
My wife is having half decent success with ecommerce. She's doing great on Etsy and eBay, and now her website is starting to pick up.
It's currently hosted on 20i who pride themselves on being an excellent WordPress and Woocommerce provider, with a half decent CDN. In reality, I think it's pretty shit for what you pay for.
I'm tempted to either grab a VPS or even go as far as a bare metal at a CoLo with public IP and run the full stack myself. If I do, shall I go Apache or Nginx? I've done both and I'm pretty agnostic. OS would be Debian.
Before I go to this length though, does anyone know of a fair priced but good performing Woocommerce platform? She's got hundreds of hours already, the plugins and over 300 products listed, so I'm loathe to move to a different solution, however, I'm not ruling it out.
The reason to not all in on Etsy or eBay is the 25% cut they take of everything. Using a personal site and Stripe payment platform means it's more 1% + 20p for processing.
Ideas, thoughts and suggestions please?
Truly I don’t think it matters much. Use what you’re comfortable with.
I think it’s more important to be comfortable administering WooCommerce and related maintenance tasks.
Also, have you considered Shopify? Depending on her sales volume it could be much cheaper to pay the flat monthly rate (plus transaction fees of course).
I was watching a Theo video a few weeks ago about something unrelated. He said that the simple solutions scale way better than most people think. Of course if you scale to FAANG size, you will have scaling issues. But until that, most solutions will scale without issue. VPS hosts allow you to increase the CPU and memory levels of a single VM to ridiculous levels. When you get beyond the limits of one machine, you can start thinking about efficiently scaling. Until then, it won’t really make a difference.
You are not wrong, but truly scaling is probably the least of your concerns in this scenario. For exactly the reasons you mention.
I've been very happy with nginx over the last 15 years, particularly for running on a slim VM, it's waaaaaay more resource efficient than apache2 was for me. What's the language of the site? Anything not static you'll have to reverse proxy through php-fpm, or some other handler. But, again, doing so was still way more resource efficient for my use.
Stack would be LEMP or LAMP, WordPress is php/Maria based.
Gotcha. My preference is for containerizing executable languages, including PHP. I'm just pure docker, no kube or anything, but setting up nginx/php-fpm/mariadb containers that can easily talk to each other (and reverse proxy things correctly) was fairly easy. I can provide a copy of my
docker-compose.yml
if you need a template to work off of.I have a 2 core 8gb (I think) instance with 10gb of storage that costs me €7/month. When I was looking a few years ago, it was by far the cheapest option and more flexible. I use it to run k3s stack for a small hobby website. It's way more iron than I need, so I am eventually going to factor the cluster management out of the website so I can launch other containers on it.
You could easily set up the instance to run Debian (or whatever) and skip the kubernetes stuff
Edit: Arrrgh, I'm down with a cold and not firing on all cylinders. It's hosted with Hetzner.
Who's that with?
Hetzner. Put in all the details but the name! I blame this cold. Thanks for asking.
You have the right idea, the platforms take too much of a cut (provided you're not too reliant on them for exposure) and a decent VPS from the right NOC is cheap... Under $20 a month if you're not paying extra for server management software like cPanel or Plesk and under $50 if you are.
As far as Apache vs Nginx goes, the differences are small unless you're talking about a really big volume of traffic. If that were the case Nginx performance is a little better.
One potential downside of Nginx in your case is that it doesn't use .htaccess files which may require some reconfig for a WP installation. Also it doesn't handle PHP natively but instead passes it off. A popular workaround is to run both Nginx and Apache together with Nginx passing off requests it can't handle to Apache.
Note that WP/Woocommerce is famously not the best option for large, high traffic ecommerce sites. However Woo is still in active development and will presumably get better. Also, if you get to that level of volume the extra hardware costs to support Woo should be minimal relative to revenue.
And to be clear, "really big volume" is on the order of multiple thousands of requests per second. Even 100k unique visitors a day would be a trivial thing if they're not hitting all instantaneously.
Yeah, we're not talking anywhere near volume at this time.
The internal Web servers I run at work, and one public one, are nginx now. I haven't touched Apache for about 5 years. Both would easily handle the load, it's more about painting time really.
Have you tried Caddy? It's a newer solution which supports automatic HTTPS and other modern functionality (you can see more on their site). I used it a bit and found it very nice to use and configure. Its website also lists a wrapper around it specifically for PHP sites (including Wordpress) called FrankenPHP, but I've never heard of it so don't know what advantages it has over plain Caddy.
Also, yeah, as @gianni said, consider Shopify. There's a reason most online shops use it these days - you just don't have anything as simple to set up and use (though I've seen some FOSS Shopify alternatives, but I don't know anything about them either)
I'm currently in the process of teaching myself how to self-host a website on a VPS with Podman for containerization. I'm planning to use Caddy since it is so highly recommended!
@g33kphr33k, Here is a good podcast episode with the creator of Caddy if you want to hear a bit more about it: https://syntax.fm/show/340/servers-with-matt-from-caddy/transcript
I don't have much WordPress or WooCommerce experience, but I've set up and managed Debian/Apache servers for work and as a hobby. I have some servers running on AWS Lightsail and I also have a Digital Ocean Droplet server. Hosting cost for either service is fairly cheap, $5-$10/month for the lowest tier and goes up $10 for each tier above the lowest.
I know both have options for running a WordPress/WooCommerce prebuilt image, but I've only ever run the base Debian images.
Personally, I'm a fan of Apache (don't have a lot of Nginx experience), but I don't think there would be a huge difference between using Apache vs Nginx on a small business website. At work, we have a site running on Apache that sees consistent traffic from ~100 users every day and it manages just fine. I think either choice would be a perfectly good fit for a small business site and you probably wouldn't notice any performance differences between the two at this scale, so it's really up to your personal preference and level of comfort.