使用 alias

  1. http {
  2. server {
  3. location /static/ {
  4. alias /static/;
  5. }
  6. }
  7. }