git - Gitweb - 404 - No projects found -
i have digitalocean droplet centos 7 can't see repos on droplet.
i have user git
, inside respective home folder have folder "projects": /home/git/projects
inside folder test repo initialized with: git init --bare
here gitweb.conf
$projectroot = "/home/git/projects"; $git_temp = "/tmp"; $home_link = $my_uri || "/"; $home_text = "indextext.html"; $projects_list = $projectroot;
here sites-availables file:
server { listen 80; server_name git.apselom.com; access_log /var/log/nginx/git.apselom.com.access_log main; error_log /var/log/nginx/git.apselom.com.error_log info; location /gitweb.cgi { root /var/www/git/; include fastcgi_params; gzip off; fastcgi_param script_name $uri; fastcgi_param gitweb_config /etc/gitweb.conf; fastcgi_pass unix:/var/run/fcgiwrap.socket; } location / { root /var/www/git/; index gitweb.cgi; } }
with those, error: 404 - no projects found
.
i suspect problem user web server running unable access git repositories.
what's odd said you're using centos 7, centos 7 ships apache httpd, , have looks lighttpd configuration. gitweb
package centos ships apache configuration file, using basically:
install package(s):
yum install gitweb httpd
create
git
user , make sureapache
user able access things:# useradd -c 'git user' git # usermod -a -g git apache # su - git <<eof mkdir projects git init --bare projects/project1 git init --bare projects/project2 eof # chmod -r g+rwx /home/git
edit
/etc/gitweb.conf
point projects directory:our $projectroot = "/home/git/projects";
start web server:
systemctl enable httpd systemctl start httpd
and you're go:
$ links http://localhost/git/ [...] project description owner last change project1 unnamed repository; edit this... git user no commits summary | shortlog | log | tree project2 unnamed repository; edit this... git user no commits summary | shortlog | log | tree
the key part, though, ensuring web server has appropriate permissions on /home/git
directory. if you're not using apache, figure out user web server using , substitute in above.
Comments
Post a Comment