【问题标题】:gitlab wrong API pathgitlab错误的API路径
【发布时间】:2013-07-25 05:59:21
【问题描述】:

我有 gitlab 提供的 nginx 配置:

  upstream gitlab {
  server unix:/home/git/gitlab/tmp/sockets/gitlab.socket;
  }

server {
listen 80;         # e.g., listen 192.168.1.1:80; In most cases *:80 is a good idea
server_name myserver;     # e.g., server_name source.example.com;
root /home/git/gitlab/public;

 # individual nginx logs for this gitlab vhost
 access_log  /var/log/nginx/gitlab_access.log;
 error_log   /var/log/nginx/gitlab_error.log;

location / {
# serve static files from defined root folder;.
# @gitlab is a named location for the upstream fallback, see below
try_files $uri $uri/index.html $uri.html @gitlab;
}

 # if a file, which is not found in the root folder is requested,
  # then the proxy pass the request to the upsteam (gitlab unicorn)
location @gitlab {...

但我在推送时收到此消息: open() "/usr/local/nginx/html/api/v3/internal/allowed" 失败(2:没有这样的文件

必须是“/home/git/gitlab/public/api.... 我该如何解决?

【问题讨论】:

    标签: nginx gitlab


    【解决方案1】:

    尝试改成listen *:80;,重启nginx看看是否依旧。

    【讨论】:

    • 谢谢!我已经通过将 puma 配置更改为 tcp 端口 9292 实例使用 unix 套接字来修复。
    • @monkey 记得接受答案,如果问题已解决,请创建您自己的答案。
    猜你喜欢
    • 1970-01-01
    • 2021-06-02
    • 2019-10-06
    • 2020-05-30
    • 2016-11-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-16
    相关资源
    最近更新 更多