centos 7 gitweb with apache config
- install
apache
andgitweb
sudo yum install gitweb httpd -y
- create user add config group information
# 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
- git web config
sudo vim /etc/gitweb.conf
our $projectroot = "/home/git/projects";
- start apache
sudo systemctl enable httpd
sudo systemctl start httpd
The key part, though, is ensuring that your web server has appropriate permissions on your
/home/git
directory. If you're not using Apache, figure out what user your web server is using and then substitute that in the above.
网友评论