Как я могу правильно настроить конфиг nginx ssl для всех портов?

Мое приложение разделяется на 2 порта: Клиент(3000) и Сервер(8080)
Кое-как я настроил https для клиента, но не могу выполнять с клиента запросы на сервер из-за проблем ssl. выскакивает ошибка: This request has been blocked; the content must be served over HTTPS. Подскажите мне, как я могу для обоих портов настроить ssl?

server {
    server_name xxx www.xxx;
    root /var/www/xxx;
    index index.html index.htm index.php;

    location / {
        proxy_pass http://localhost:3000;
        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;
   }

    location /products {
        proxy_pass http://localhost:8080/products;
        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;
   }


    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
     }
    location ~ /\.ht {
        deny all;
    }
}


    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/xxx/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/xxxu/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

}

server {
    if ($host = xxx) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    listen 80;
    server_name xxx www.xxx
    return 404; # managed by Certbot


}


Ответы (0 шт):