Internal Server Error 500 - Proxy

Last 20 hours I am trying to fix this issue, Please help me.
I have read other suggested topics of internal server error 500. But none of them is related to mine. I have installed docker image of echoip at port 2087 of my Ubuntu 22.04 arm instance. I copied default.tpl and deafult.stpl to 2087.tpl and 2087.stpl and then changed their proxy port to 2087. In hestiacp web ui I have selected this proxy template for my website ei.afzl.live.
When I type http my domain it works and display correctly but when I type https my domain it says internal server error 500. In Nginx log I get this error:

[error] 1557#0: *1 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined array key "v_nginx_cache_duration" in /usr/local/hestia/web/edit/web/index.php on line 255" while reading response header from upstream, client: 121.52.145.237, server: _, request: "POST /edit/web/?domain=ei.afzl.live HTTP/1.1", upstream: "fastcgi://unix:/var/run/hestia-php.sock:", host: "hcp.afzl.live:2083", referrer: "https://hcp.afzl.live:2083/edit/web/?domain=ei.afzl.live"

image

I also tried setting backend temmplate to default and no-php but no one worked.

My 2087.stpl template:

server {
    listen      %ip%:%proxy_ssl_port% ssl http2;
    server_name %domain_idn% %alias_idn%;
    ssl_certificate      %ssl_pem%;
    ssl_certificate_key  %ssl_key%;
    ssl_stapling on;
    ssl_stapling_verify on;
    error_log  /var/log/%web_system%/domains/%domain%.error.log error;

    include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;

    location / {
        proxy_pass      https://%ip%:2087;
        location ~* ^.+\.(%proxy_extensions%)$ {
            root           %sdocroot%;
            access_log     /var/log/%web_system%/domains/%domain%.log combined;
            access_log     /var/log/%web_system%/domains/%domain%.bytes bytes;
            expires        max;
            try_files      $uri @fallback;
        }
    }

    location /error/ {
        alias   %home%/%user%/web/%domain%/document_errors/;
    }

    location @fallback {
        proxy_pass      https://%ip%:2087;
    }

    location ~ /\.(?!well-known\/|file) {
       deny all;
       return 404;
    }
}

Should not cause an 500 error as it is an warning.

Have patched the issue in 1.6.8 and will be released in the next few days

Yes It seems like warning but what about:

it works only with http request but as soon https comes it gives that warning which is actually lethal and shutdown the website.
Can you tell me how to make it work or what .stpl changing I should make?
Thanks a lot for the response.

So Today I wake up I was going to wash my face and clean my mouth, at the way I remeber what if I change https to http in both proxy pass blocks:
proxy_pass http://%ip%:2087 instead of https://%ip%:2087
because the echoip server is http only on my port 2087. I came back at once to my room and made above change and boom now Everything working.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.