Who to install 4.2 on Linux?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
Steps to make Nopcommerce 3.20 run on Linux with ssl (Ubuntu + Nginx + kestrel + MSSql).
I guess the trick is Nginx and kestrel have to run over the ssl (not only Nginx).
Link explaining how to create certificate for kestrel. http://www.philipermish.com/blog/how-to-use-ssl-with-dotnet-core-and-kestrel/
I added the json below on the top of the appsettings.json file
  "Kestrel": {
  "EndPoints": {
    "Http": {
      "Url": "https://localhost:5555"
    },
  },
    "Certificates": {
    "HTTPS": {
      "Source": "Store",
      "StoreLocation": "CurrentUser",
      "StoreName": "My",
      "Subject": "CN=localhost",
      "AllowInvalid": true
    }
  }  
  }

Nginx configuration

server {
    listen                  80;
    server_name             mysite.com.br www.mysite.com.br;
    return      301 https://$server_name$request_uri;
  
}

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
  server_name             mysite.com.br www.mysite.com.br;

    ssl_certificate /etc/letsencrypt/live/mysite.com.br/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/mysite.com.br/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

    location / {
        proxy_pass https://dotnet;
        proxy_set_header Host $host;
    }
}

upstream dotnet {
    zone dotnet 64k;
    server localhost:5555;
}

IMPORTANT:
1 - I change the table Store - field SslEnabled to True
2 - table setting, search for securitysettings.forcesslforallpages in the field Name and change to True
I changed direct in the database, cause when i was making tests, the store became unreachable many times by the browser
4 years ago
I installed Nopcommerce 4.20 on linux (Centos 7 + Nginx + kestrel) and works perfect under https(my website url:https://nop42.coolwecool.com/).
The certificate from Let's Encrypt(https://letsencrypt.org/)
And the configure tutorial from (https://linuxize.com/post/secure-nginx-with-let-s-encrypt-on-centos-7/)
I hope it can help you.
4 years ago
Allens wrote:
I installed Nopcommerce 4.20 on linux (Centos 7 + Nginx + kestrel) and works perfect under https(my website url:https://nop42.coolwecool.com/).
The certificate from Let's Encrypt(https://letsencrypt.org/)
And the configure tutorial from (https://linuxize.com/post/secure-nginx-with-let-s-encrypt-on-centos-7/)
I hope it can help you.


By the way,note this below:
1 - set SSL enabled to True,go to the store edit page(https://yourdomain/Admin/Store/Edit/1) and set it
2 - set securitysettings.forcesslforallpages to True(https://yourdomain/Admin/Setting/AllSettings,search securitysettings.forcesslforallpages to set it)
3 - edit the appsettings.json file,set the UseHttpXForwardedProto to true and restart your application,or you will get error "ERR_TOO_MANY_REDIRECTS"
4 years ago
Allens wrote:
I installed Nopcommerce 4.20 on linux (Centos 7 + Nginx + kestrel) and works perfect under https(my website url:https://nop42.coolwecool.com/).
The certificate from Let's Encrypt(https://letsencrypt.org/)
And the configure tutorial from (https://linuxize.com/post/secure-nginx-with-let-s-encrypt-on-centos-7/)
I hope it can help you.

By the way,note this below:
1 - set SSL enabled to True,go to the store edit page(https://yourdomain/Admin/Store/Edit/1) and set it
2 - set securitysettings.forcesslforallpages to True(https://yourdomain/Admin/Setting/AllSettings,search securitysettings.forcesslforallpages to set it)
3 - edit the appsettings.json file,set the UseHttpXForwardedProto to true and restart your application,or you will get error "ERR_TOO_MANY_REDIRECTS"




Thank you very much, solve my troubles for many days.
4 years ago
Thank you! Guys, I already install NopCommerce 4.2 in CentOS 7, with Nginx & Kestrel service, also mysql, performance speed very good, also using .webp images... plugins & everything work fine.
4 years ago
Hi,I successfully installed nc42 on Ubuntu by this tutorial:https://www.c-sharpcorner.com/article/how-to-run-nopcommerce-on-linux-using-docker/
& for ssl I used cloudflare.com with the free plan.

In DNS,
1- Replace your nameservers with those provided by cloudflare.com.
2- Add an A Record for yourdomain.com & your VPS IP.
3- Add an A Record for www            & your VPS IP.

In SSL/TLS,
select Flexible.


That is it.I hope it is useful.
4 years ago
sk5202 wrote:
Hello, I am in the same status installing Nop 4.20 on Debian. We followed all suggestion, Nop Forum and Microsoft documentation Is it possible to have a full guide to install it on Linux system? Thanks



Hello,

Here is the full guide.

https://www.c-sharpcorner.com/article/how-to-run-nopcommerce-on-linux-using-docker/



Hello,
Thank you for the link, which has enabled me to configure a Ubuntu Server for testing. I have reached the installation page on the browser for nopCommerce, but cannot find the correct database username, so am unable to complete the setup. What should the username be to go with nopCommerce_db_password? Alternatively, is there a way of getting it from the command line?
Thank you
4 years ago
Hello Allens!

Can you show your nop4.2.conf file after setting ssl?

Allens wrote:
I installed Nopcommerce 4.20 on linux (Centos 7 + Nginx + kestrel) and works perfect under https(my website url:https://nop42.coolwecool.com/).
The certificate from Let's Encrypt(https://letsencrypt.org/)
And the configure tutorial from (https://linuxize.com/post/secure-nginx-with-let-s-encrypt-on-centos-7/)
I hope it can help you.

By the way,note this below:
1 - set SSL enabled to True,go to the store edit page(https://yourdomain/Admin/Store/Edit/1) and set it
2 - set securitysettings.forcesslforallpages to True(https://yourdomain/Admin/Setting/AllSettings,search securitysettings.forcesslforallpages to set it)
3 - edit the appsettings.json file,set the UseHttpXForwardedProto to true and restart your application,or you will get error "ERR_TOO_MANY_REDIRECTS"
4 years ago
cunamy wrote:
Hello Allens!

Can you show your nop4.2.conf file after setting ssl?

I installed Nopcommerce 4.20 on linux (Centos 7 + Nginx + kestrel) and works perfect under https(my website url:https://nop42.coolwecool.com/).
The certificate from Let's Encrypt(https://letsencrypt.org/)
And the configure tutorial from (https://linuxize.com/post/secure-nginx-with-let-s-encrypt-on-centos-7/)
I hope it can help you.

By the way,note this below:
1 - set SSL enabled to True,go to the store edit page(https://yourdomain/Admin/Store/Edit/1) and set it
2 - set securitysettings.forcesslforallpages to True(https://yourdomain/Admin/Setting/AllSettings,search securitysettings.forcesslforallpages to set it)
3 - edit the appsettings.json file,set the UseHttpXForwardedProto to true and restart your application,or you will get error "ERR_TOO_MANY_REDIRECTS"


server {
   listen 80;
   server {
   server_name nop42.coolwecool.com;
   return 301 https://$host$request_uri;
}

server {
   listen 443 ssl http2;
   server_name nop42.coolwecool.com;

   ssl_certificate /etc/letsencrypt/live/nop42.coolwecool.com/fullchain.pem;
   ssl_certificate_key /etc/letsencrypt/live/nop42.coolwecool.com/privkey.pem;
   ssl_trusted_certificate /etc/letsencrypt/live/nop42.coolwecool.com/chain.pem;
   include snippets/ssl.conf;
   include snippets/letsencrypt.conf;

   location / {
   proxy_pass http://your ip:your port;
   proxy_http_version 1.1;
   proxy_set_header X-FORWARDED-PROTO https;
   proxy_read_timeout 120s;
   proxy_set_header Host $host;
   proxy_set_header X-real-IP $remote_addr;
   proxy_set_header X-Forwarded-For $remote_addr;
   }
}
4 years ago
Hallo,i have installed nopcommerce on ubuntu and how i can relase this from localhost to web with Plesk?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.