Jump to content

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

NGINX Configuration for cs-cart Rate Topic   * * * * * 1 votes

 
  • vidan
  • Senior Member
  • Members
  • Join Date: 11-Jan 10
  • 373 posts

Posted 28 October 2011 - 11:42 PM #1

location / {

index index.php;

if (-f $request_filename) {
break;
}

if (-d $request_filename) {
break;
}

rewrite ^ /index.php?sef_rewrite=1;

try_files $uri $uri/ /index.php?sef_rewrite=1;

}


and this is not working :|

 
  • albertginger
  • Junior Member
  • Authorized Reseller
  • Join Date: 31-Aug 08
  • 62 posts

Posted 13 December 2011 - 12:59 AM #2


location / {

if (-f $request_filename/index.html){

rewrite (.*) $1/index.html break;

}

if (-f $request_filename/index.php){

rewrite (.*) $1/index.php;

}

if (!-f $request_filename){

rewrite ^ /index.php?sef_rewrite=1;

}

}

location ~* .(tpl|zip|gz)$ {

if (-f $request_filename) {

return 403;

}

}


Official Partners & Authorized Reseller: IECSP
Over 10 free addons on our site.

 
  • maxman
  • Newbie
  • Members
  • Join Date: 28-Dec 11
  • 7 posts

Posted 28 December 2011 - 04:26 PM #3

I error out:
Home Page- 403
admin.php -500


[error] 4050#0: *7624 rewrite or internal redirection cycle while processing "/index.php", client: ......., server: f......., request: "GET /admin.php HTTP/1.1", host: "........"

 
  • panag
  • Member
  • Members
  • Join Date: 14-May 10
  • 80 posts

Posted 30 December 2011 - 08:00 AM #4

Check this site it may help get the rewrites working http://www.anilcetin...ccess-to-nginx/ also their english mailing list forum is very helpful http://forum.nginx.org/list.php?2

 
  • solesurvivor
  • Senior Member
  • Members
  • Join Date: 05-Aug 11
  • 745 posts

Posted 30 December 2011 - 02:51 PM #5

Isn't NGINX just an HTTP SERVER replacement? Is anyone using it and seeing better performance than with Apache?

 
  • Adrian8
  • Junior Member
  • Members
  • Join Date: 04-Feb 11
  • 138 posts

Posted 31 December 2011 - 03:14 PM #6

NGinx is a high performance webserver (HTTP / HTTPS) with very small memory footprint compared to Apache (code bloated, high memory footprint). NGinx also has some nice features which give it an edge when serving static content, including serving pre-gzipped files if they are available.

Two configuration options for using NGinx with CS-Cart:

1) NGinx (Serving Static) + FastCGI PHP
2) NGinx (Serving Static) + Apache Backend PHP

If you have limited server memory then NGinx will improve server performance when compared with Apache
www.ecopolar.com - V2.1.4
www.ledpolar.com - V2.2.4

 
  • solesurvivor
  • Senior Member
  • Members
  • Join Date: 05-Aug 11
  • 745 posts

Posted 02 January 2012 - 12:28 AM #7

so if i have a vps with 2048 megs of ram and cpanel do you think i would benefit from NGinx?

 
  • panag
  • Member
  • Members
  • Join Date: 14-May 10
  • 80 posts

Posted 05 January 2012 - 04:55 AM #8

Isn't NGINX just an HTTP SERVER replacement? Is anyone using it and seeing better performance than with Apache?


Sure it's a "replacement" Zappos, Facebook and many others have replaced apache with nginx, it's become more popular than IIS, http://www.infoworld...b-server-183079

If you configure your VPS correctly you'll see the performance increase. You can test it's performance by noting what you servers memory and CPU usage are currently with apache and compare once you install nginx.

 
  • Adrian8
  • Junior Member
  • Members
  • Join Date: 04-Feb 11
  • 138 posts

Posted 05 January 2012 - 03:53 PM #9

You would reduce memory used when compared using standalone Apache. You could also gain some performance improvements especially if you use some of the other features.

If you wish to use a php op-code cache then you will want to use Apache as backend + PHP Module, so the opcode cache is then shared between apache child processes. NGinx Frontend will serve all static requests, leaving Apache to handle dynamic requests (for a typical cs-cart webpage this will be 1 request / page). This means you can have a very stripped down Apache (remove many unused modules) serving just dynamic requests.

If you are going to use NGinx then it is best to download and compile from source, and include modules required (e.g. http_gzip_static module, http_ssl module ....)
www.ecopolar.com - V2.1.4
www.ledpolar.com - V2.2.4

 
  • Adrian8
  • Junior Member
  • Members
  • Join Date: 04-Feb 11
  • 138 posts

Posted 05 January 2012 - 04:42 PM #10

Apache Performance Hint
You can also gain some performance improvement with Apache by disabling htaccess rules. You will then need to set up these rules in your httpd.conf file (this will only be option for VPS or dedicated servers). So you will have all your per directory options in httpd.conf. This saves IO access time reading htaccess files.
In httpd.conf use following to disable reading of .htaccess files:-
AllowOverride None

<Directory "/www/yourstore/">
DirectoryIndex index.php
Order allow,deny
Allow from all
Options +FollowSymLinks -Indexes -MultiViews -Includes
AllowOverride None

rewrite rules etc
</Directory>
<Directory "www/yourstore/sub-directory">
Rules from sub-directory htaccess file
</Directory>
Sub-Directories: addons, catalog, controllers, core, images, js, lib, payments etc....
www.ecopolar.com - V2.1.4
www.ledpolar.com - V2.2.4

 
  • tigerbabba
  • Member
  • Members
  • Join Date: 26-Apr 08
  • 257 posts

Posted 10 April 2013 - 06:07 PM #11

This might help you

http://www.sohaib.co...on-for-cs-cart/
Currently using CS-Cart 4.x
Fortigate Firewalls