Answer the question
In order to leave comments, you need to log in
How to set up git+nginx to work over HTTP?
It was on apache2 and everything worked completely Clone / Pull and Push.
File /etc/apache2/conf.d/git :
SetEnv GIT_PROJECT_ROOT /srv/git/repos/
SetEnv GIT_HTTP_EXPORT_ALL
ScriptAlias /git/ /usr/lib/git-core/git-http-backend/
Alias /git /srv/git/repos
<Directory /usr/lib/git-core>
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
AllowOverride None
Order allow,deny
Allow from all
AuthType Basic
AuthName "Git Server"
Require valid-user
AuthUserFile /etc/apache2/git.htpasswd
</Directory>
location ~ /git(/.*) {
access_log /srv/git/log/acees.log;
error_log /srv/git/log/error.log;
#auth_basic "Restricted";
#auth_basic_user_file /etc/nginx/git.htpasswd;
fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
include fastcgi_params;
fastcgi_param GIT_HTTP_EXPORT_ALL "";
fastcgi_param GIT_PROJECT_ROOT /srv/git/repos;
fastcgi_param PATH_INFO $1;
fastcgi_param REMOTE_USER $remote_user;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
}
Answer the question
In order to leave comments, you need to log in
In the error.log, what do the request URLs to /git/ look like? can you write here?
nginx must be built with modules dav dav-ext
and added to location ~ /git(/.*) {
dav_methods PUT DELETE MKCOL COPY MOVE;
dav_ext_methods PROPFIND OPTIONS;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question