Get Maximum out of 4.3.1: The Best Server Configuration

...And what about NGINX watermark rules translation? Nobody answer yet.

Hello,
If you use NGINX + PHP-FPM, you can add this to NGINX configuration file:
location ~* ^/images/(product|category|detailed|thumbnails)/.*(png|jpg|jpeg|gif)$ {
   if (-f $request_filename) {
       rewrite ^(.*)$ /index.php?dispatch=watermark.create;
   }
}
Make sure that you pass REQUEST_URI header to your FastCGI process (PHP-FPM). One of your NGINX configuration files should include this line:
fastcgi_param REQUEST_URI $request_uri;
If none of your NGINX configuration files include this line, add this line to other FastCGI parameters as described here: https://www.nginx.com/resources/wiki/start/topics/examples/phpfcgi/
I haven't tested this solution yet, but I hope it works fine. Unfortunately, if you use NGINX as a reverse proxy for Apache, the solution won't work. I've informed CS-Cart developers about that.
Thank You.
I'm using watermark only on detailed images. Not on thumbnails and others small. So it was problem 504 error until I deleted "|thumbnails" variant from rule. Since that the rule became work. Some questions:
1. Can I use following rule if I use watermark only in detailed images:
location ~* ^/images/detailed/.*(png|jpg|jpeg|gif)$ { .........
2. When I open for example watermarked image as https://cs.chdesign.ru/images/watermarked/1/detailed/1/example.jpg
and then try to cheat server and request as https://cs.chdesign.ru/images/detailed/1/example.jpg in order to access clear image, then I have redirected to 404 cs-cart page. Not to watermarked image. Is it normal since redirection rule tells /index.php?dispatch=watermark.create;
???

[b] 5.[/b] use [b]APCu[/b] for cache, and redis for sessions. The config.local.php file should have the following lines:

   $config['cache_backend'] = 'apc';
   $config['session_backend'] = 'redis';

Hi,

In Point 5 you said to use APCu for cache and 'apc' in the config.local.php file. Is this correct?

I have APCu installed, but when activating 'apc' in config file the site doesn't work, but 'APCu' works.

Hi,

In Point 5 you said to use APCu for cache and 'apc' in the config.local.php file. Is this correct?

I have APCu installed, but when activating 'apc' in config file the site doesn't work, but 'APCu' works.

This thread is 3 years old and probably there are things which doesn't apply to the current state of CS-Cart.

This thread is 3 years old and probably there are things which doesn't apply to the current state of CS-Cart.

True, It would be nice to get this thread updated with today's version of Cs-Cart..

I would like that.

Does anybody know how to configure imagemagick so that it uses WebP or JPEG2000 in cs-cart? Or another library that reduced image size like shortpixel, etc do?

This will shave off a lot of kb's without hardly any loss in quality.

bump

Does anybody know how to configure imagemagick so that it uses WebP or JPEG2000 in cs-cart? This will shave off a lot of kb's without hardly any loss in quality.

Yeah but 20% of the users wont be able to see your content...https://caniuse.com/#search=webp

Anyhow, using different libraries like mozjpg should be plenty as they make your images really small already.

Yeah but 20% of the users wont be able to see your content...https://caniuse.com/#search=webp

Anyhow, using different libraries like mozjpg should be plenty as they make your images really small already.

Ok, then I'll rephrase: is it possible to use a more efficient library like mozjpg with imagemagick in cs-cart? Or is it already doing this?

Ok, then I'll rephrase: is it possible to use a more efficient library like mozjpg with imagemagick in cs-cart? Or is it already doing this?

It's possible!

I mean on the Internet there is no independent research of performance, with the exception of tests LitespeedTech where LS wins an incorrectly configured NGINX and Apache. In my opinon, presented on the official website of the benchmarks are ridiculous and not objective. I urge people not to take their word.

Besides, I'm not against adaptation. I'm just saying that it's not the time now. I think, CS-Cart team has more important tasks.

So 7 years and many versions later, the following still applies

Shared hosting sucks. A lot of the accelerators won't be available or wont work properly.

What you need for a fast/reliable vps ( aim for dedicated cored & min 4gb ram)

Apache (latest stable) mpm_event proxy_fcgi

Php (latest supported)php-fpm, opcache, redis, apcu

redis

If this seems gibberish to you, then you need to hire someone.

Yes, nginx may be faster, but you will have difficulties upgrading cscart versions