feat(software/hosting-a-git-server): complete
This commit is contained in:
parent
731ad1f1f8
commit
87e2851324
4 changed files with 181 additions and 0 deletions
|
|
@ -0,0 +1,30 @@
|
|||
<VirtualHost *:443>
|
||||
ServerName <servername>
|
||||
|
||||
SSLEngine on
|
||||
SSLCertificateFile /etc/letsencrypt/live/<servername>/fullchain.pem
|
||||
SSLCertificateKeyFile /etc/letsencrypt/live/<servername>/privkey.pem
|
||||
|
||||
SetEnv GIT_PROJECT_ROOT /srv/git
|
||||
SetEnv REMOTE_USER $REDIRECT_REMOTE_USER
|
||||
|
||||
ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/
|
||||
|
||||
<Directory "/usr/libexec/git-core">
|
||||
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
|
||||
Require all granted
|
||||
AllowOverride None
|
||||
</Directory>
|
||||
|
||||
<Files "git-http-backend">
|
||||
AuthType Basic
|
||||
AuthName "Git Access"
|
||||
AuthUserFile /srv/git/.htpasswd
|
||||
Require expr !(%{QUERY_STRING} -strmatch '*service=git-receive-pack*' || %{REQUEST_URI} =~ m#/git-receive-pack$#)
|
||||
Require valid-user
|
||||
</Files>
|
||||
ProxyPassMatch ^/git/ !
|
||||
ProxyPreserveHost On
|
||||
ProxyPass / http://127.0.0.1:8000/
|
||||
ProxyPassReverse / http://127.0.0.1:8000/
|
||||
</VirtualHost>
|
||||
Loading…
Add table
Add a link
Reference in a new issue