upstream static_resource { server localhost:80; } server { listen 80; server_name localhost; location / { root /usr/share/nginx/html; index index.html; access_log off; } error_page 405 =200 @405; location @405 { root /usr/share/nginx/html; proxy_method GET; proxy_pass http://static_resource$request_uri; } location = /50x.html { root /usr/share/nginx/html; } location /favicon.ico { root /usr/share/nginx/html; log_not_found off; access_log off; } }