invalid number of arguments in "proxy_set_header" directiv

aws ec2 django, i have this error Checking for dhparams.pem proxy-1 | Checking for fullchain.pem proxy-1 | SSL cert exists, enabling HTTPS… proxy-1 | 2024/03/26 00:50:40 [emerg] 8#8: invalid number of arguments in “proxy_set_header” directiv

server {
    listen 80;
    server_name ${DOMAIN} www.${DOMAIN};

    location /.well-known/acme-challenge/ {
        root /vol/www/;
    }

    location / {
        return 301 https://$host$request_uri;
    }
}

server {
    listen      443 ssl;
    server_name ${DOMAIN} www.${DOMAIN};

    ssl_certificate     /etc/letsencrypt/live/${DOMAIN}/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/${DOMAIN}/privkey.pem;

    include     /etc/nginx/options-ssl-nginx.conf;

    ssl_dhparam /vol/proxy/ssl-dhparams.pem;

    add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;

    location /static {
        alias /vol/static;
    }

    location / {
        uwsgi_pass           ${APP_HOST}:${APP_PORT};
        include              /etc/nginx/uwsgi_params;
        client_max_body_size 10M;
    }

    location /ws/ {
        proxy_pass http://ravi.raviquizdataapi.com:9001;
        proxy_buffering off;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Port $server_port;
    }
}

Welcome @valen-xx !

Please do not try to post the complete issue in the title. The title should be a brief identification of the problem. Post the full description in the body of the message.

Also: When posting code, errors, config files or other preformatted text here, enclose the code between lines of three backtick - ` characters. This means you’ll have a line of ```, then your code, then another line of ```. This forces the forum software to keep your code properly formatted. (I’ve taken the liberty of fixing your original post for you.)

Please post the full set of log messages associated with this error from the nginx log.