kju
kju

Reputation: 146

gitlab wrong API path

I have nginx config from gitlab provided:

  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 {...

But I get this message when push: open() "/usr/local/nginx/html/api/v3/internal/allowed" failed (2: No such file

It must be "/home/git/gitlab/public/api.... How can I fix it?

Upvotes: 1

Views: 553

Answers (1)

axil
axil

Reputation: 797

Try changing it to listen *:80;, restart nginx and see if it persists.

Upvotes: 2

Related Questions