Who to install 4.2 on Linux?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 года назад
Iam using nopcommerce 4.20 build on linx ubuntu 18.04. But i don't know why admin page is secure with ssl, but front page is not secure.
This is image for admin
https://ibb.co/vz5JX47
This is image front
https://ibb.co/h7h91G8
This is my website https://onable.net/
What did I do wrong?
3 года назад
dinhvanvo wrote:
Iam using nopcommerce 4.20 build on linx ubuntu 18.04. But i don't know why admin page is secure with ssl, but front page is not secure.
This is image for admin
https://ibb.co/vz5JX47
This is image front
https://ibb.co/h7h91G8
This is my website https://onable.net/
What did I do wrong?


It should redirect to https  on front end as per your settings.  

What are you using for SSL termination? You can add the redirection rule there as well.
3 года назад
I'm facing a strange error while trying to install nopCommerce in CentOS.
The website returns ERR_TOO_MANY_REDIRECTS error always while a test .NET Core app runs smoothly.

Then I try to investigate where the problem is by running
dotnet <folder>/Nop.Web.dll
and it gives me the following result:


crit: Microsoft.AspNetCore.Hosting.Diagnostics[6]
      Application startup exception
System.IO.DirectoryNotFoundException: /root/Themes/
   at Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root, ExclusionFilters filters)
   at Nop.Web.Framework.Infrastructure.Extensions.ApplicationBuilderExtensions.UseNopStaticFiles(IApplicationBuilder application) in C:\andrei\nop_sources\src\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ApplicationBuilderExtensions.cs:line 228
   at Nop.Web.Framework.Infrastructure.NopCommonStartup.Configure(IApplicationBuilder application) in C:\andrei\nop_sources\src\Presentation\Nop.Web.Framework\Infrastructure\NopCommonStartup.cs:line 67
   at Nop.Core.Infrastructure.NopEngine.ConfigureRequestPipeline(IApplicationBuilder application) in C:\andrei\nop_sources\src\Libraries\Nop.Core\Infrastructure\NopEngine.cs:line 195
   at Nop.Web.Framework.Infrastructure.Extensions.ApplicationBuilderExtensions.ConfigureRequestPipeline(IApplicationBuilder application) in C:\andrei\nop_sources\src\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ApplicationBuilderExtensions.cs:line 45
   at Nop.Web.Startup.Configure(IApplicationBuilder application) in C:\andrei\nop_sources\src\Presentation\Nop.Web\Startup.cs:line 58
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
   at Microsoft.AspNetCore.Hosting.ConfigureBuilder.<>c__DisplayClass4_0.<Build>b__0(IApplicationBuilder builder)
   at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass13_0.<UseStartup>b__2(IApplicationBuilder app)
   at Microsoft.AspNetCore.Mvc.Filters.MiddlewareFilterBuilderStartupFilter.<>c__DisplayClass0_0.<Configure>g__MiddlewareFilterBuilder|0(IApplicationBuilder builder)
   at Microsoft.AspNetCore.HostFilteringStartupFilter.<>c__DisplayClass0_0.<Configure>b__0(IApplicationBuilder app)
   at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
Unhandled exception. System.IO.DirectoryNotFoundException: /root/Themes/
   at Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root, ExclusionFilters filters)

   at Nop.Web.Framework.Infrastructure.Extensions.ApplicationBuilderExtensions.UseNopStaticFiles(IApplicationBuilder application) in C:\andrei\nop_sources\src\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ApplicationBuilderExtensions.cs:line 228
   at Nop.Web.Framework.Infrastructure.NopCommonStartup.Configure(IApplicationBuilder application) in C:\andrei\nop_sources\src\Presentation\Nop.Web.Framework\Infrastructure\NopCommonStartup.cs:line 67
   at Nop.Core.Infrastructure.NopEngine.ConfigureRequestPipeline(IApplicationBuilder application) in C:\andrei\nop_sources\src\Libraries\Nop.Core\Infrastructure\NopEngine.cs:line 195
   at Nop.Web.Framework.Infrastructure.Extensions.ApplicationBuilderExtensions.ConfigureRequestPipeline(IApplicationBuilder application) in C:\andrei\nop_sources\src\Presentation\Nop.Web.Framework\Infrastructure\Extensions\ApplicationBuilderExtensions.cs:line 45
   at Nop.Web.Startup.Configure(IApplicationBuilder application) in C:\andrei\nop_sources\src\Presentation\Nop.Web\Startup.cs:line 58
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
   at Microsoft.AspNetCore.Hosting.ConfigureBuilder.<>c__DisplayClass4_0.<Build>b__0(IApplicationBuilder builder)
   at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass13_0.<UseStartup>b__2(IApplicationBuilder app)
   at Microsoft.AspNetCore.Mvc.Filters.MiddlewareFilterBuilderStartupFilter.<>c__DisplayClass0_0.<Configure>g__MiddlewareFilterBuilder|0(IApplicationBuilder builder)
   at Microsoft.AspNetCore.HostFilteringStartupFilter.<>c__DisplayClass0_0.<Configure>b__0(IApplicationBuilder app)
   at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
   at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
   at Nop.Web.Program.Main(String[] args) in C:\andrei\nop_sources\src\Presentation\Nop.Web\Program.cs:line 12
Aborted


But obviously Themes folder is there! Can anyone please help me to solve the issue?
3 года назад
The previous problem is fixed. I actually run the command under Root user, but the website is hosted under another user. That's why the system was searching the file under Root directory, not under user directory and eventually failed.

But I can't resolve "too many redirects" error yet. I don't setup any SSL yet and can't find where is the problem!

Can anyone please suggest?
3 года назад
ratul_63 wrote:
The previous problem is fixed. I actually run the command under Root user, but the website is hosted under another user. That's why the system was searching the file under Root directory, not under user directory and eventually failed.

But I can't resolve "too many redirects" error yet. I don't setup any SSL yet and can't find where is the problem!

Can anyone please suggest?


edit the appsettings.json file,set the UseHttpXForwardedProto to false and restart your application
3 года назад
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"


By the way, The website url has been migrated to: https://nop.coolwecool.com, and the corresponding nop version is nopcommerce 4.3.

A little introduction about nop: http://nopdesc.coolwecool.com, hope it helps for you.
3 года назад
Allens wrote:
The previous problem is fixed. I actually run the command under Root user, but the website is hosted under another user. That's why the system was searching the file under Root directory, not under user directory and eventually failed.

But I can't resolve "too many redirects" error yet. I don't setup any SSL yet and can't find where is the problem!

Can anyone please suggest?

edit the appsettings.json file,set the UseHttpXForwardedProto to false and restart your application


UseHttpXForwardedProto is set to false already, as this is fresh installation. But still too many redirects. :(
3 года назад
ratul_63 wrote:
The previous problem is fixed. I actually run the command under Root user, but the website is hosted under another user. That's why the system was searching the file under Root directory, not under user directory and eventually failed.

But I can't resolve "too many redirects" error yet. I don't setup any SSL yet and can't find where is the problem!

Can anyone please suggest?

edit the appsettings.json file,set the UseHttpXForwardedProto to false and restart your application

UseHttpXForwardedProto is set to false already, as this is fresh installation. But still too many redirects. :(


select * from Setting where Name like '%ssl%';
select * from Store;
Set the value named 'securitysettings.forcesslforallpages' to False
Set SslEnabled to False in the store
3 года назад
Allens wrote:
The previous problem is fixed. I actually run the command under Root user, but the website is hosted under another user. That's why the system was searching the file under Root directory, not under user directory and eventually failed.

But I can't resolve "too many redirects" error yet. I don't setup any SSL yet and can't find where is the problem!

Can anyone please suggest?

edit the appsettings.json file,set the UseHttpXForwardedProto to false and restart your application

UseHttpXForwardedProto is set to false already, as this is fresh installation. But still too many redirects. :(

select * from Setting where Name like '%ssl%';
select * from Store;
Set the value named 'securitysettings.forcesslforallpages' to False
Set SslEnabled to False in the store


There is no database yet. As I can't even install it. It shows too many redirects from the first run.
This is the URL: http://gaminion.xyz
2 года назад
ratul_63 wrote:
The previous problem is fixed. I actually run the command under Root user, but the website is hosted under another user. That's why the system was searching the file under Root directory, not under user directory and eventually failed.

But I can't resolve "too many redirects" error yet. I don't setup any SSL yet and can't find where is the problem!

Can anyone please suggest?


How did you fix "System.IO.DirectoryNotFoundException: /root/Themes/" ?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.