Last active
April 25, 2017 23:37
-
-
Save gtmanfred/8b2e26b07db3c75094d0607048b2c828 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user nginx; | |
worker_processes 1; | |
error_log /var/log/nginx/error.log warn; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include /etc/nginx/mime.types; | |
default_type application/octet-stream; | |
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | |
'$status $body_bytes_sent "$http_referer" ' | |
'"$http_user_agent" "$http_x_forwarded_for"'; | |
access_log /var/log/nginx/access.log main; | |
sendfile on; | |
keepalive_timeout 65; | |
server { | |
listen 80 default_server; | |
server_name git.local; | |
location ~ /git(/.*) { | |
alias /srv/git; | |
try_files $uri @git; | |
} | |
location @git { | |
#auth_basic "git"; | |
#auth_basic_user_file /srv/git/gitusers; | |
include uwsgi_params; | |
# export all repositories under GIT_PROJECT_ROOT | |
uwsgi_param GIT_HTTP_EXPORT_ALL ""; | |
uwsgi_param GIT_PROJECT_ROOT /srv/git; | |
uwsgi_param PATH_INFO $1; | |
# required for pusing to repo | |
uwsgi_param REMOTE_USER $remote_user; | |
uwsgi_read_timeout 10; | |
uwsgi_modifier1 9; | |
uwsgi_pass 127.0.0.1:8021; | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[uwsgi] | |
socket = 127.0.0.1:8021 | |
plugin = cgi | |
cgi = /usr/local/libexec/git-core/git-http-backend | |
chdir = %d | |
post-buffering = 8192 | |
# start up to 4 but try to stay at 1 | |
processes = 4 | |
cheaper = 1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment