Want more timely Centmin Mod News Updates?
Become a Member

CS-Cart CS-Cart on Centmin mod

Discussion in 'Ecommerce / Shopping cart usage' started by Tran Hoang Hiep, Mar 4, 2015.

  1. Tran Hoang Hiep

    Tran Hoang Hiep New Member

    2
    0
    1
    Mar 4, 2015
    Ratings:
    +0
    Local Time:
    4:12 AM
  2. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    7:12 AM
    Nginx 1.13.x
    MariaDB 5.5
    Welcome @Tran Hoang Hiep

    probably better to ask in Ecommerce forums at Ecommerce / Shopping cart usage | Centmin Mod Community unfortunately, I have no experience with CS-Cart so can't really help. You should ask CS-Cart developers if they have nginx rewrite rule example for CS-Cart and then provide those here so we can see if me can massage them into Centmin Mod Nginx's vhost format.

    As per Getting Started Guide step 2, you would of created a new domain Nginx vhost as you have already done so I assume
     
    Last edited: Mar 4, 2015
    • Like Like x 1
  3. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    7:12 AM
    Nginx 1.13.x
    MariaDB 5.5
    Ok quick google search for CS-Cart and Nginx rewrites led me to NGINX Configuration How To - CS-Cart Community Forums Centmin Mod Nginx format is different so for Centmin Mod Nginx, the only relevant line you need is changing Nginx vhost in Centmin Mod for try_files in /usr/local/nginx/conf/conf.d/newdomain.com.conf where newdomain.com.conf is your domain's Nginx vhost file

    from

    Code:
      # Enable for vBulletin usage WITHOUT vbSEO installed
      #try_files    $uri $uri/ /index.php;
    to

    Code:
     # CS-Cart rewrite url
     try_files $uri $uri/ /index.php?sef_rewrite=1;
    
    restart Nginx server
     
    • Like Like x 1
  4. Tran Hoang Hiep

    Tran Hoang Hiep New Member

    2
    0
    1
    Mar 4, 2015
    Ratings:
    +0
    Local Time:
    4:12 AM
    I'm sorry but my site not work.

    **** /usr/local/nginx/conf/cscart/general.conf:
    location / {
    root /home/nginx/domains/store.epomi.com/public_html;
    index index.php;
    try_files $uri $uri/ /index.php?sef_rewrite=1;
    }
    **** /usr/local/nginx/conf/conf.d/store.epomi.com.conf:
    server {
    server_name store.epomi.com www.store.epomi.com;
    location / {
    root /home/nginx/domains/store.epomi.com/public_html;
    index index.php;
    try_files $uri $uri/ /index.php?sef_rewrite=1;
    }
    include /usr/local/nginx/conf/wordpress/general.conf;
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;

    # limit_conn limit_per_ip 16;
    # ssi on;

    access_log /home/nginx/domains/store.epomi.com/log/access.log combined buffer=32k;
    error_log /home/nginx/domains/store.epomi.com/log/error.log;

    root /home/nginx/domains/store.epomi.com/public;


    include /usr/local/nginx/conf/staticfiles.conf;
    include /usr/local/nginx/conf/php.conf;
    include /usr/local/nginx/conf/drop.conf;
    #include /usr/local/nginx/conf/errorpage.conf;
    }
     
  5. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    7:12 AM
    Nginx 1.13.x
    MariaDB 5.5
    what is /usr/local/nginx/conf/cscart/general.conf for ? i don't think that is needed so move that include file

    oh that is different one at include /usr/local/nginx/conf/wordpress/general.conf; ?

    but you probably need to ask at CS-Cart support for most up to date Nginx rewrites

    so start with something like - replace newdomain.com with your domain (this is the format default for Centmin Mod's next version .08 beta)
    Code:
    # Centmin Mod Getting Started Guide
    # must read http://centminmod.com/getstarted.html
    
    # redirect from non-www to www
    # uncomment, save file and restart Nginx to enable
    # if unsure use return 302 before using return 301
    #server {
    #            listen   80;
    #            server_name newdomain.com;
    #            return 301 $scheme://www.newdomain.com$request_uri;
    #       }
    
    server {
      server_name newdomain.com www.newdomain.com;
    
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
      # limit_conn limit_per_ip 16;
      # ssi  on;
    
      access_log /home/nginx/domains/newdomain.com/log/access.log combined buffer=256k flush=60m;
      error_log /home/nginx/domains/newdomain.com/log/error.log;
    
      root /home/nginx/domains/newdomain.com/public;
    
      location / {
        try_files $uri $uri/ /index.php?sef_rewrite=1;
      }
    
      include /usr/local/nginx/conf/staticfiles.conf;
      include /usr/local/nginx/conf/php.conf;
      include /usr/local/nginx/conf/drop.conf;
      #include /usr/local/nginx/conf/errorpage.conf;
    }
     
    Last edited: Mar 4, 2015