1

我从 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" failed (2: No such file

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

4

1 回答 1

2

尝试将其更改为listen *:80;,重新启动 nginx 并查看它是否仍然存在。

于 2013-07-25T16:52:15.607 回答