server { listen 80; server_name _; set $root_path "/usr/share/nginx/html"; root $root_path; location / { root html; index index.html index.htm; error_page 405 = $uri; } }