我试图根据请求URI"忽略"或重定向nginx日志中的某些请求.
到目前为止我有这个:
server {
  listen      80;
  #...
  access_log  /var/log/nginx/site.access;
  error_log   /var/log/nginx/site.error info;
  #...
  try_files $uri @app
  location = /lbcheck.html {
    access_log off;
    log_not_found off;
    try_files $uri @app;
  }
  location @app {
    proxy_redirect     off;
    proxy_pass http://unix:/tmp/site.unicorn.sock;
    #...
  }
}
基本上我希望代理的@app响应请求,/lbcheck.html但我不希望它登录/var/log/nginx/site.access;
我知道我可以用if ($uri = /lbcheck.html) { access_log off; }in 来做location @app但如果是邪恶的,所以我不想使用它们.
当我们的项目开始时,我们不熟悉git,并且在某些时候决定重新启动存储库.这意味着我们将所有文件导入新存储库,丢失了所有历史记录.
今天我想知道是否有办法重新组合这两个存储库.基本上,"old-repo"中文件的历史记录应该添加到"new-repo"中该文件的历史记录中.
有谁知道如何开始这个?