0

I have recently replaced my apache web server with nginx

I want to know how can I write below statements for nginx server status

<Location /server-status>
        SetHandler server-status
        Order deny,allow
        Deny from all
        Allow from 10.
        Allow from 127.
    </Location>
devops
  • 1,121
  • 5
  • 20
  • 50
  • You could use http://nginx.org/en/docs/http/ngx_http_stub_status_module.html which is the equivalent built-in service of nginx. – fvu Jan 07 '18 at 18:28
  • yes , i tried this locations: '/nginx_status/': stub_status: 'on' access_log: 'off' deny: 'all' allow: '127.' allow: '10.' But it gives error for writing "10." , how can I write like this for nginx. It worked for apache but not nginx – devops Jan 07 '18 at 18:31
  • http://nginx.org/en/docs/http/ngx_http_access_module.html nginx config is pretty different from Apache so I can only advise to spend some time reading its documentation. – fvu Jan 07 '18 at 18:33

0 Answers0