Show active connections nginx
Built-in nginx status page: active, reading, writing, waiting
curl -s http://localhost/stub_status
more nginx
all 15 commands →
Block IP range
deny 192.168.1.0/24;
deny 10.0.0.1;
allow all;
Proxy WebSocket
location /ws/ {
proxy_pass http://backend;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
}
Test configuration
nginx -t
Reload without downtime
nginx -s reload
Show compiled modules
nginx -V 2>&1 | tr ' ' '\n' | grep module