question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

nginx warn: using uninitialized "subdomain" variable while sending response to client

See original GitHub issue

Nginx error log has many lines like these:

[warn] 32237#32237: *122 using uninitialized “subdomain” variable while sending response to client, client: 1.2.3.4, server: jitsi.example.com, request: “GET / HTTP/1.1”, subrequest: “/config.js”, host: “jitsi.example.com”

Seems like the $subdomain variable is called but not initialized in the vhost template.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
solracsfcommented, Mar 31, 2020

Thanks for pointing me in the right direction. Maybe i’m wrong but shouldn’t the $subdomain be set to an empty string here?

location = /config.js {
    set $subdomain "";
    alias /etc/jitsi/meet/jitsi.example.com-config.js;
}

because, if a subdomain is really used, it will be catch by the block bellow:

location ~ ^/([^/?&:'"]+)/config.js$ {
    set $subdomain "$1.";
    set $subdir "$1/";
    alias /etc/jitsi/meet/jitsi.example.com-config.js;
}

?

0reactions
saghulcommented, Nov 3, 2022

This has long ago been fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nginx using uninitialized "subdomain" variable - Install & Config
In my nginx error log with connect I get the following waring: 2020/04/07 22:03:57 ... "subdomain" variable while sending response to client,…
Read more >
Uninitialized variable in access_log - nginx - Server Fault
I suspect that Nginx evaluates the access_log directive in an earlier phase than those of the rewrite module (i.e. set , if ,...
Read more >
using uninitialized variable error : r/nginx - Reddit
I am running Nginx 1.18 on Ubuntu 20.04. include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
Read more >
Warning in the Nginx log, need explanation of the request
Check log_format parameter for $year variable. It's undefined while logging the request. Nginx's variable list: ...
Read more >
CVE-2017-20005 - CVE.report
Bugfix: when using HTTP/2 nginx might return the 400 response without ... Bugfix: client connections might be dropped during configuration testing when ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found