ubuntu gitlab upload avator 404
Created by: abcfy2
I use ubuntu deb package installed the gitlab. But I find upload avator is not working.
curl -I http://mygitlab//uploads/user/avatar/7/headshot.png
HTTP/1.1 404 Not Found
Server: nginx
Date: Wed, 05 Nov 2014 04:04:57 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Status: 404 Not Found
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-UA-Compatible: IE=edge
Cache-Control: no-cache
Set-Cookie: request_method=HEAD; path=/
X-Request-Id: 60977938-522c-488b-8fa5-9b21b2028192
X-Runtime: 0.066767
I find the /var/opt/gitlab/nginx/etc/gitlab-http.conf
is like this
server {
listen *:8000;
server_name 117.34.92.46;
server_tokens off; # don't show the version number, a security best practice
root /opt/gitlab/embedded/service/gitlab-rails/public;
Then I go to /opt/gitlab/embedded/service/gitlab-rails/public, and I find the avator image exists.
ll /opt/gitlab/embedded/service/gitlab-rails/public/uploads/user/avatar/7/headshot.png
-rw-r--r-- 1 git git 27150 11 5 11:32 /opt/gitlab/embedded/service/gitlab-rails/public/uploads/user/avatar/7/headshot.png
But nginx also return 404, why and how to fix?