Score:0

Nginx `ngx_http_stub_status_module` with multiple sites on the same server (VM)

aw flag

Server is a VM running Debian 11 with nginx-extras package.

I have the ngx_http_stub_status_module setup in /etc/nginx/conf.d/stub_status.conf as shown below.

server {
    listen 127.0.0.1:8080;
    server_name 127.0.0.1;

    location /stub_status {
        stub_status;
    }
}

I can curl 127.0.0.1:8080/stub_status and get results.

I have multiple Nginx sites enabled under /etc/nginx/sites-enabled/

/etc/nginx/sites-enabled/
|-- com.mydomain.internal.homeassistant -> /etc/nginx/sites-available/com.mydomain.internal.homeassistant
`-- com.mydomain.internal.wiki -> /etc/nginx/sites-available/com.mydomain.internal.wiki

When I visit each site, the numbers from the curl command increment. However, I can't figure out if that curl command is counting metrics for one site, or both. I think it's both.

Is there a way for it to only count one? Asking because I'm using the nginx-prometheus-exporter to gather metrics and it has duplicate metrics for both sites on the dashboard...

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.