Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Get Maximum out of 4.3.1: The Best Server Configuration. Rate Topic   * * * * * 1 votes

 
  • gleb.goncharov
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 04-Oct 13
  • 351 posts

Posted 25 January 2017 - 02:21 PM #121

...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.co...amples/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.


 
  • da3020
  • Senior Member
  • Members
  • Join Date: 17-Dec 16
  • 208 posts

Posted 27 January 2017 - 02:13 PM #122

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....d/1/example.jpg
and then try to cheat server and request as https://cs.chdesign....d/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;
???


 
  • alaa
  • Advanced Member
  • Trial users
  • Join Date: 18-Mar 18
  • 51 posts

Posted 29 March 2018 - 03:17 AM #123



5. use APCu 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. 



 
  • martfox
  • Member
  • Authorized Reseller
  • Join Date: 15-Jan 10
  • 552 posts

Posted 03 April 2018 - 08:50 PM #124

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.


CS-Cart with 1 Year FREE Web Hosting | CS-Cart optimized SSD Cloud VPS Servers from €10.00/month
.
VPS SSD Cloud from €10.00 *** Dedicated Servers *** CS-Cart Authorized Reseller and Web Hosting Provider


 

Posted 03 April 2018 - 09:46 PM #125

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..


Elkhorn Graphics LLC
Cs-Cart 4.7.1  SP3


 
  • jimmyod
  • Senior Member
  • Members
  • Join Date: 24-Apr 12
  • 432 posts

Posted 04 April 2018 - 11:05 AM #126

I would like that.