Is OpenLiteSpeed a good Apache Replacement?

#21

Not being able to answer is what’s weak here

BTW

You’re welcome to visit here, we don’t bite (in general)

0 Likes

#22

Thanks bro.

0 Likes

#23

Ok, back to benchmarks :

https://www.litespeedtech.com/benchmarks

0 Likes

#24

Considering trying it out for a few of my sites. When I tried installing it alongside Nginx + PHP FPM on Debian, it messed up the config for the FPM packages (locked them so they couldn’t be upgraded), so it seems like Litespeed’s custom PHP build doesn’t like sitting alongside other PHP builds.

There’s an Apache module to add LSAPI support to Apache (part of CloudLinux: Introducing mod_lsapi - supercharge your Apache PHP hosting – CloudLinux) which should in theory give Apache a similar performance boost for PHP. I haven’t tried that though.

2 Likes

#25

I installed OLS and then CyberPanel on December, but nginx performed so much better.

Too many bugs on CyberPanel.

Will try again in a couple of months

0 Likes

#26

Still that wouldn’t address the fact that Apache is a bloated resource hog

0 Likes

#27

Try LSWS with Plesk or DirectAdmin, it works flawlessly

https://www.litespeedtech.com/products/litespeed-web-server/control-panel-plugins

0 Likes

#28

Emm… no money for that :rofl:

I will keep my beautiful nginx meanwhile.

1 Like

#29

Let’s compare .conf - I hated it, but I have grown so used to debian Apache configuration that I don’t know if I could cat everything together and live with it.

I’d like to throw nginx in front, and then squid, and then BunnyCDN… and then…

1 Like

#30

I used to use Varnish + nginx for Wordpress, but suddenly (I don’t know why) Wordpress started to take a lot of time while saving the posts (and clearing Varnish cache) that I had to get rid of Varnish.

Pure nginx now, but A LOT slower. Still faster than OLS.

1 Like

#31

I tested openlitespeed some time ago the performance didn’t seem that much better than Nginx.

I currently got Nginx for static and Apache behind it for PHP, for my own sites I could just use Nginx but am hosting a few other people sites family and friends It just too much of a pain with pure Nginx since I need to convert all their htaccess, it easier to just put Apache in the stack so htaccess works.

1 Like

#32

This one is very nice too, fast as hell

http://monkey-project.com/about/

0 Likes

#33

The thing with that graph is that it doesn’t say which Apache MPM module is being used. If they tested with something like prefork, then of course it’ll be slower. I don’t think Apache has an MPM module that uses non blocking IO, though :frowning_face:

Also, why would the server load go down slightly with 50 connections to LSWS compared to 20?

0 Likes

#34

What I’ve found to work best is WP Super Cache plus Nginx configured to serve the super cache HTML files directly. Last I checked, WP Super Cache didn’t come with an example Nginx configuration out-of-the-box, so my config was based on an example in the WordPress wiki.

/etc/nginx/snippets/wordpress/wp-super-cache.conf:

set $cache_uri $request_uri;

# POST requests and urls with a query string should always go to PHP
if ($request_method = POST) {
  set $cache_uri 'null cache';
}
if ($query_string != "") {
  set $cache_uri 'null cache';
}

# Don't cache uris containing the following segments
if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php
                      |wp-.*.php|/feed/|index.php|wp-comments-popup.php
                      |wp-links-opml.php|wp-locations.php|sitemap(_index)?.xml
                      |[a-z0-9_-]+-sitemap([0-9]+)?.xml)") {

  set $cache_uri 'null cache';
}

# Don't use the cache for logged in users or recent commenters
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_logged_in") {
  set $cache_uri 'null cache';
}

set $cachefile "/wp-content/cache/supercache/$http_host/$cache_uri/index.html";
if ($https ~* "on") {
    set $cachefile "/wp-content/cache/supercache/$http_host/$cache_uri/index-https.html";
}

/etc/nginx/snippets/wordpress/common.conf:

index index.php;

# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
location ~ /\. {
  deny all;
}
# Block PHP files in uploads, content, and includes directory.
location ~* /(?:uploads|files|wp-content|wp-includes)/.*\.php$ {
  deny all;
}

# Far future expires for autoptimize combined/minified files
# https://wordpress.org/plugins/autoptimize/
location /wp-content/cache/autoptimize/ {
  expires 1y;
}

# Regular content
location /wp-content/uploads/ {
  expires 1w;
}

location ~ \.php$ {
  include fastcgi_params;
  fastcgi_pass php7;
}

location / {
  try_files $cachefile $uri $uri/ /index.php?$args;
}

/etc/nginx/snippets/wordpress.conf:

include /etc/nginx/snippets/wordpress/wp-super-cache.conf;
include /etc/nginx/snippets/wordpress/common.conf;

Then I have each WordPress site configured like this (eg. in /etc/nginx/sites-available/example.com):

server {
        server_name example.com;
        listen 443 http2;
        ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
        root /var/www/example.com/;
        index index.php;

        include snippets/wordpress.conf;
}

# Redirect to HTTPS
server {
        server_name example.com;
        listen 80;
        return 301 https://$host$request_uri;
}
2 Likes

#35

I use some options from W3 Total Cache (broweser, object and database cache). For Page Cache I make the configuration directly con Nginx with fastcgi_cache. But Varnish was better.

0 Likes

#36

I don’t understand these panel’s limiting the ram we can use

0 Likes

#37

This is unfair and biased as hell. They conveniently only tested Nginx without any sort of caching - and we all know WordPress does terribly without caching. This is called bullshit marketing.

2 Likes

#38

Which Apache MPM? I don’t suppose they tested the “event” MPM, but instead used the very old and bad “prefork”.

0 Likes

#39

don’t “suppose” or “assume”

run both on a seperate but identical VPS and see it for yourself

0 Likes

#40

While OLS is pretty fast I found the problems arising from it back then (client websites acting up etc) not worth the hassle compared to Apache (+nginx) setup.

0 Likes