Can't enable SSL

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
1 year ago
I use docker to run nopCommerce application at port 8080, then I install an Nginx Container running at port 448 80, I install Cloudflare for nginx.

My application runs fine, but I can't enable SSL on the admin page, and when I turn on my console, my general application uses the ip to get the image data.
1 year ago
Hi! Have you set the UseProxy setting? When using nginx, this setting must be enabled.
1 year ago
alexey.a wrote:
Hi! Have you set the UseProxy setting? When using nginx, this setting must be enabled.


I just tried enable it in appsetting and enable ssl in store configuration and see the database, i readlized that the value enablessl in database still 0. I force change it to 1 then my site show nhatcam.com redirected you too many times.
1 year ago
Can you provide site config from /etc/nginx/sites-available?
1 year ago
alexey.a wrote:
Can you provide site config from /etc/nginx/sites-available?

yes sure, this is my config nginx
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##

# Default server configuration
#

upstream docker-proxy {
        server nopcommerce:80;
}

server {
        listen 80 default_server;
        listen [::]:80 default_server;

        # SSL configuration
        #
        listen 443 ssl default_server;
        listen [::]:443 ssl default_server;

        ssl_certificate  /root/cert/cert.pem;
        ssl_certificate_key   /root/cert/cert.key;

        root /var/www/html;

        # Add index.php to the list if you are using PHP
        index index.html index.htm index.nginx-debian.html;

        server_name nhatcam.com;

        location / {
                        # First attempt to serve request as file, then
                        # as directory, then fall back to displaying a 404.
                        proxy_pass http://docker-proxy;
                        proxy_http_version 1.1;
                        proxy_set_header Upgrade $http_upgrade;
                        proxy_set_header Connection 'upgrade';
                        proxy_set_header Host $host;
                        proxy_cache_bypass $http_upgrade;
        }
}
1 year ago
Looks like you forgot to define X-Forwarded headers in your config:

    proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header   X-Forwarded-Proto $scheme;
1 year ago
alexey.a wrote:
Looks like you forgot to define X-Forwarded headers in your config:

    proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header   X-Forwarded-Proto $scheme;


Still have error

1 year ago
alexey.a wrote:
Looks like you forgot to define X-Forwarded headers in your config:

    proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header   X-Forwarded-Proto $scheme;


do you have any ideal for this
1 year ago
You can try adding Docker proxy IP address to the KnownProxies setting. That's all I can suggest at the moment.
1 year ago
alexey.a wrote:
You can try adding Docker proxy IP address to the KnownProxies setting. That's all I can suggest at the moment.


Im still facing to this issue.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.