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.

Add option to activate /nginx_status

See original GitHub issue

I think it would be interesting to add the option to activate /nginx_status

I was trying to do my implementation for myself and to pull a request but I was not able to do it successfully. Have anyone done it? Help please.

I was doing a .conf file to add to dock-composer as a volume - /my_proxy.conf:/etc/nginx/conf.d/my_proxy.conf:ro

server { listen 127.0.0.1:80; server_name 127.0.0.1; location /nginx_status { stub_status on; allow 127.0.0.1; deny all; } }

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
outcast1000commented, Apr 11, 2021

You can also use nginx-proxy hostname to listen and put “allow all”.

Example: If the name of the nginx-proxy container is “nginx-proxy” then you could have a conf like this:

server { 
	listen nginx-proxy:80; 
	server_name nginx-proxy; 
	location /nginx_status { 
		stub_status on; 
		allow all; 
	} 
} 

Pros: Generic solution. No need for set MY_PUBLIC_IP Cons: It is publicly available. If you do not want that then you may change the listening port. Example:

server { 
	listen nginx-proxy:8081; 
	server_name nginx-proxy; 
	location /nginx_status { 
		stub_status on; 
		allow all; 
	} 
} 

You may test it from a container in the same network with ‘nginx-proxy’ with this way: docker exec nginx-proxy-letsencrypt wget -qO - http://nginx-proxy:8081/nginx_status

1reaction
tigptcommented, Mar 14, 2017

I can now check the proxy status from the docker host with this change.

server { server_name MY_PUBLIC_IP; location /nginx_status { stub_status on; access_log off; allow MY_PUBLIC_IP; deny all; } }

Thanks for your help @thomasleveil its working now. Its here for other if they need.

Do docker set any hostname to the docker host that I can use instead of manually enter IP? Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Enable NGINX Status Page
On most Linux distributions, the Nginx version comes with the ngx_http_stub_status_module enabled. You can check out if the module is already ...
Read more >
Enable Nginx Status Page
Nginx status page can give realtime data about Nginx's health. It can help you tweak few Nginx config. Status data can be used...
Read more >
HowTo: Enable Nginx Status Page
Enable Nginx status page on Linux/Unix. Edit nginx.conf, enter: # vi nginx.conf. Update your server { ..... } ...
Read more >
Setting Up NGINX
Download and install the file in a location of your choice, ... On the Launch Status page, click the View Instances button at...
Read more >
Add option to activate /nginx_status · Issue #762
I can now check the proxy status from the docker host with this change. server { server_name MY_PUBLIC_IP; location /nginx_status { stub_status ...
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