我从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 .... 我该如何解决?
答案 0 :(得分:2)
尝试将其更改为listen *:80;
,重新启动nginx并查看是否仍然存在。