I have successfully installed gitlab which use nginx (Thanks to this thread: gitlab installation: using localhost). I can run the software in localhost (http:// localhost will get me to gitlab front page). All of this are in a vmware.
I have tried mapping the host 666 port to the vmware ngnix 80 port. So, going to http:// localhost:666 supposedly will give me the gitlab front page.
The problem is: I only get "Welcome to nginx!" page.
This is what my access log looks like:
10.1.17.74 - - [25/Mar/2013:00:24:59 -0700] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22"
-
ls -l /etc/nginx/sites-*
produces
/etc/nginx/sites-available:
total 8
-rw-r--r-- 1 root root 2496 2011-02-25 19:20 default
-rw-r--r-- 1 root root 1198 2013-03-24 09:12 gitlab
/etc/nginx/sites-enabled:
total 0
lrwxrwxrwx 1 root root 34 2013-03-24 03:59 default -> /etc/nginx/sites-available/default
lrwxrwxrwx 1 root root 33 2013-03-24 04:00 gitlab -> /etc/nginx/sites-available/gitlab
Contents of /etc/nginx/sites-available/gitlab
# GITLAB
# Maintainer: @randx
# App Version: 5.0
upstream gitlab {
server unix:/home/git/gitlab/tmp/sockets/gitlab.socket;
}
server {
listen 127.0.0.1:80 default_server; # e.g., listen 192.168.1.1:80;
server_name localhost; # 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 {
proxy_read_timeout 300; # https://github.com/gitlabhq/gitlabhq/issues/694
proxy_connect_timeout 300; # https://github.com/gitlabhq/gitlabhq/issues/694
proxy_redirect off;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://gitlab;
}
}
ls -l /etc/nginx/sites-*
and what are the contents of/etc/nginx/sites-available/gitlab
? (Please add them to your question.) – Ladadadada Mar 25 '13 at 13:39