location /nginx_status {
    # Enable nginx status page
    stub_status on;

    # Disable status page logging in access_log
    access_log off;

    # Allow access from 127.0.0.1
    allow 127.0.0.1;

    # Deny all the other connections
    deny all;
}