AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-57200

Jayen's questions

Martin Hope
Jayen
Asked: 2013-04-05 23:09:00 +0800 CST

如何使用嵌套的 Nginx 位置块(前缀与正则表达式指令)?

  • 93

我无法理解 nginx 中的嵌套位置。我有两个位置有一些共同的配置指令,所以与其重复这些指令,我更愿意使用正则表达式重复 URI:

location ~ /a|/b {
        location /a {
        }
        location /b {
        }
}

但是,这给出了错误

nginx: [emerg] location "/a" is outside location "/a|/b" in /etc/nginx/nginx.conf:36

不过,没有 or|似乎还可以。

location ~ /a {
        location /a {
        }
}

我究竟做错了什么?有没有更好的方法来做到这一点而不重复任何事情?我可以用另一种方式对位置进行分组吗?

nginx
  • 1 个回答
  • 116107 Views
Martin Hope
Jayen
Asked: 2012-07-21 05:12:49 +0800 CST

git 拒绝通过 HTTP 发送凭据

  • 3

curl似乎工作正常,但git没有。git要求输入密码,但随后不发送任何凭据。

作品:curl --netrc http://test.git.unsw.edu.au/和curl -u username:password http://test.git.unsw.edu.au/

不起作用:git remote update

Password for 'http://[email protected]': 
* Couldn't find host test.git.unsw.edu.au in the .netrc file; using defaults
User-Agent: git/1.7.9.5
Host: test.git.unsw.edu.au
Accept: */*
Pragma: no-cache

为什么不git发送凭据?

从一个strace,我看到:

  1. 读.netrc
  2. GET /repo/info/refs?service=git-receive-pack HTTP/1.1- 没有凭证
  3. HTTP/1.0 401 Unauthorized
  4. 读.netrc
  5. GET /repo/info/refs?service=git-receive-pack HTTP/1.0- 没有凭证
  6. HTTP/1.0 401 Unauthorized
  7. 提示输入密码
  8. 读.netrc
  9. * Couldn't find host test.git.unsw.edu.au in the .netrc file; using defaults
  10. GET /repo/info/refs?service=git-receive-pack HTTP/1.1- 没有凭证
  11. HTTP/1.0 401 Unauthorized
authentication
  • 2 个回答
  • 4452 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve