https and api
Hello.
When a enable ssl on web site, api connect don`t work, frontend say maintenance work.
I try add revers proxy but it`s not help.
my config on proxy pass server:

server {
    listen 80;
    server_name ethash.altcoinpool.ru;
    access_log /var/log/nginx/ethash.altcoinpool.ru-access.log;
    error_log /var/log/nginx/ethash.altcoinpool.ru-error.log;
    set_real_ip_from 95.165.168.191;
    real_ip_header X-Real-IP;
    return 301 https://$server_name$request_uri;
    }

server {
    listen 443 ssl http2;
    server_name ethash.altcoinpool.ru;
    access_log /var/log/nginx/ethash.altcoinpool.ru-ssl-access.log;
    error_log /var/log/nginx/ethash.altcoinpool.ru-ssl-error.log;
    set_real_ip_from 95.165.168.191;
    real_ip_header X-Real-IP;

    ssl on;
    ssl_certificate /etc/letsencrypt/live/altcoinpool.ru/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/altcoinpool.ru/privkey.pem;
    ssl_session_timeout 5m;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_dhparam /etc/ssl/certs/dhparam.pem;
    ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
    ssl_prefer_server_ciphers on;
    ssl_session_cache shared:SSL:10m;

    location /.well-known/acme-challenge/ {
        root /var/www/html/acme-challenge/;
    }
    location / {
        proxy_pass http://192.168.0.136;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Real-IP $remote_addr;
    }
    
    location /api/ {
        proxy_pass http://192.168.0.136:4000;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $scheme;
        proxy_set_header X-Real-IP $remote_addr;

        proxy_redirect http:// https://;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
     }

}

config on api and web server:

server {
    listen 80;
    server_name ethash.altcoinpool.ru;
    access_log /var/log/nginx/altcoinpool.ru-access.log;
    error_log /var/log/nginx/altcoinpool.ru-error.log;
    set_real_ip_from 95.165.168.191;
    real_ip_header X-Real-IP;

     root /var/www/html;

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

        server_name ethash.altcoinpool.ru;

        location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
                try_files $uri $uri/ =404;
        }


        location /api/ {
        proxy_pass http://192.168.0.136:4000;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $scheme;
        proxy_set_header X-Real-IP $remote_addr;

        proxy_redirect http:// https://;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Reverse-Proxy true;
       }
}

Who can help with this problem?