Welcome to Centmin Mod Community
Become a Member

Need Opencard nginx templates

Discussion in 'Ecommerce / Shopping cart usage' started by 00001, May 23, 2022.

  1. 00001

    00001 New Member

    Sep 7, 2019
    Local Time:
    2:25 AM

    i want to install OpenCard Need advice on VHOST and nginx templates.

    HTTPS is planned to be used. What parameters are needed to set vhost (for OpenCard) ?

    3.issue live cert with HTTP + HTTPS (trusted)
    4.issue live cert with HTTPS default (trusted)

    I had a test installation of CentminMod with LetsEncrypt ssl certificate, setting to mode - HTTPS default.

    However, when I tried to renew the certificate on a schedule, the script began to write that it could not find the required code in the folder to confirm my ownership.
    (Verify error:Invalid response from Domain.com)

    As I understand it, in the mode - HTTPS default, after the expiration of the ssl certificate, it is impossible to automatically renew the certificate on a schedule. No access on port 80.

    Then point 3 (HTTP + HTTPS)? Search engines consider such a site to be a duplicate.

    If I select option 3, will additional settings be required? Redirect from http to https? Are rewrites needed?

    Additional nginx settings for OpenCart.
    There are many examples on the Internet, but I would like to get the settings from you. Too difficult for me.

    my template - Pastebin.com

    ps.Noob in nginx, and do not speak English, sry.

  2. eva2000

    eva2000 Administrator Staff Member

    May 24, 2014
    Brisbane, Australia
    Local Time:
    9:25 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    number 4 for live HTTPS default is usually the correct one for live sites.

    Your pastebin Nginx vhost doesn't have any SSL settings, you should be editing /usr/local/nginx/conf/conf.d/yourdomain.com.ssl.conf vhost for HTTPS and not the non-HTTPS vhost at /usr/local/nginx/conf/conf.d/yourdomain.com.conf if you answered number 3 for HTTP + HTTPS trusted SSL cert option

    I am not familiar with Opencard? Or is it OpenCart ? Seems threads at https://community.centminmod.com/forums/ecommerce-shopping-cart-usage.35/?prefix_id=63

    If it's OpenCart, I think only thing you need to do is edit existing Nginx vhost and alter the main location / {} context to
    Code (Text):
        location / {
            try_files $uri $uri/ /index.php?$args;

    Provided you fixed your Nginx vhost, you can use below workaround for this. What you can do is sort of partial manual steps from Migrating Existing Nginx Vhost From HTTP to HTTP/2 based HTTPS With Letsencrypt SSL Certificates in that you temporarily disable your /usr/local/nginx/conf/conf.d/domain.com.ssl.conf nginx vhost and recreate the non-https nginx vhost /usr/local/nginx/conf/conf.d/domain.com.conf using the official Nginx vhost generator at Generate Centmin Mod Nginx Vhost - CentminMod.com LEMP Nginx web stack for CentOS (which is step 1 of guide at Migrating Existing Nginx Vhost From HTTP to HTTP/2 based HTTPS With Letsencrypt SSL Certificates).

    Then follow manual steps 2, 3, 4, 5 and 6 of guide at Migrating Existing Nginx Vhost From HTTP to HTTP/2 based HTTPS With Letsencrypt SSL Certificates where step 6 you can re-enable your https /usr/local/nginx/conf/conf.d/domain.com.ssl.conf nginx vhost and disable your non-https nginx vhost /usr/local/nginx/conf/conf.d/domain.com.conf again.

    Then you can test your domain at Let's Debug to ensure future renewals work.

    If you don't have any important data on the site yet, you can just remove the Nginx vhost and try again re-creating it.

    To properly remove an Nginx vhost the instructions are on official site at How to delete Nginx vhost account for existing domain/subdomain ? as well as on each Nginx vhost creation's ending output too lists the commands.

    You also get a log file for each Nginx vhost created which also lists the commands in 123.09beta01 and higher example for http2.domain.com remove log at /root/centminlogs/centminmod_140218-021218_nginx_addvhost_nv-remove-cmds-http2.domain.com.log
    Code (Text):
    ls -lahrt /root/centminlogs/ | grep remove
    -rw-r--r--   1 root root 1.3K Feb 14 02:12 centminmod_140218-021218_nginx_addvhost_nv-remove-cmds-http2.domain.com.log