nginx重定向回首页

server {
  listen      18001;
  server_name  _;
  location / {
    rewrite ^/(?<left>.*)$ / break;
    proxy_pass http://192.168.0.1:18002/index.html;
  }
}
server {
  listen      18002;
  server_name  _;
  location / {
    root /opt/web/maintenance;
    index  index.html;
  }
}