Nginx+Apache vs Nginx vs OpenLiteSpeed

I am playing with DirectAdmin configuration and I have noticed that during the initial setup it allows me to pick one of those web servers:

  • Nginx
  • Apache + Nginx
  • OpenLiteSpeed

Until now I never considered anything else than Nginx, but since I'm playing with DirectAdmin configuration I would like to find more performant setup.

At the moment I have a bunch of PHP sites (no wordpress, laravel only) which generate 50k views/day. I have cloudflare in front of each website, so about 60-70% of the requests are cached.
The only thing that tempts me to move to OLS or apache+nginx is htaccess file support.

I know that a common setup is apache+nginx, but my VM has only 2GB of RAM.

Which web server do you prefer?

Comments

  • Nginx, I can find tons solutions on web if I face any problem.

    Thanked by (2)Cappuccino vyas

    Action and Reaction in history

  • cybertechcybertech OGBenchmark King

    for high load, ols out of the box is really good. for php it can work better with caching.

    Thanked by (1)Cappuccino

    I bench YABS 24/7/365 unless it's a leap year.

  • I would go with OpenLitespeed, as I have with all my servers. You can cache PHP without using the LSCache plugin with OpenLitespeed using RewriteRules in .htaccess. You can clear the cache using Cron if needed.

  • The best choices depends on if your just hosting your own site or offering shared hosting.

    If it just your own site and got admin access Nginx might be a good option and if you need any rewrite since you got admin you can add them to the Nginx conf for site.

    Shared hosting scenario Nginx only is a pain since it doesn't support .htaccess for any rewrite e.g. pretty url you would need to ask the admin to edit the site nginx conf.

    In the shared hosting environment you would need to use a setup that support htaccess so you would need to use Apache or openLitespeed, Apache got a advantage over openLitespeed it doesn't need to be reloaded to pick up a change in htaccess since openLitespeed only read htaccess on start-up.

    Thanked by (3)Cappuccino vyas Not_Oles
  • FYI: With pre-release and retail Standard/Lite licenses when Nginx+Apache is installed, you may select pure (standalone) Nginx for any of the domains, and enable WordPress URL rewrites with FastCGI cache (just install nginx cache plugin for WordPress after). It also has URL rewrite selections for many other CMS.

    Thanked by (1)Cappuccino
  • If you are playing with configurations i will suggest you mesaure the performance with apache + nginx(reverse proxy) against nginx and OLS i used OLS and tbh i don't find much difference in performance while comparing OLS and nginx but with shared hosting standard using nginx is just calling for trouble so the only option left is either use apache + nginx or standalone apache. The time i was using vestacp with apache + nginx (reverse proxy) the performance was really great to say the least it might be better or worse it depends on "testing".

    Regards

    Thanked by (1)Cappuccino

    Active lurker nothing more nothing less, want to discuss something? i am all ears!

  • visualwebtechnovisualwebtechno Hosting ProviderOG

    apache+nginx is good performance wise is really great

    Thanked by (1)Cappuccino
  • At the end I installed only apache2, because I was too lazy to rewrite htaccess for nginx :#
    Probably, if my lazy ass approves, I will change apache2 with apache2+nginx

  • edited April 2021

    For high load websites -
    1. OLS the best and the fact faster for high load website :o <3
    2. Apache2+Nginx good combination performance.
    3.Possibly Apache2+Varnish+Nginx Combination.

    For normal websites with low-medium visitors and lowend server everything alone will be enough ;) -
    1.OLS alone
    2.Nginx alone
    3.Apache alone

  • skorupionskorupion Services Provider

    I have got cyberpanel with ols and I love it.
    Its fast, that's it.

  • vyasvyas OGRetired

    @gemuruhco said:

    >

    For normal websites with low-medium visitors and lowend server everything alone will be enough ;) -
    1.OLS alone
    2.Nginx alone
    3.Apache alone

    Makes sense. You can add
    4. Caddy (@yoursunny has a good post on it)

  • @vyas said:
    4. Caddy (@yoursunny has a good post on it)

    I have Caddy + nginx.

    • Caddy provides TLS termination.
    • nginx provides caching and application functionality.

    This setup, compares to nginx alone, has the benefit of simplifying TLS setup.
    Caddy not only obtains TLS certificates automatically, but also comes with a good set of default ciphersuite parameters that works with all modern browsers and receives an "A" rating on SSL Server Test.

    Full article: yoursunny.com is Served by Caddy

    nginx is only used by yoursunny.com main website.
    My personal Nextcloud is a Docker container on the same machine, using the same Caddy instance as reverse proxy.
    The beacon server for collecting video playback statistics is served by Caddy alone, which simply logs all HTTP requests for later analysis; I don't even need PHP or any other server side script.

    Note that there's no DirectAdmin in the picture.
    I am anti all sorts of control panels. #DeleteDirectAdmin
    I write Caddyfile and nginx configuration manually to maximize performance, and allow them to be version controlled.

    Webhosting24 aff best VPS; ServerFactory aff best VDS; Cloudie best ASN; Huel aff best brotein.

Sign In or Register to comment.