Advertisement
wheeler

Nginx for git

Mar 4th, 2015
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 0.92 KB | None | 0 0
  1. server {
  2.         listen 443;
  3.         ssl on;
  4.         ssl_certificate /etc/nginx/ssl/cert.crt;
  5.         ssl_certificate_key /etc/nginx/ssl/key.key;
  6.  
  7.         server_name test.com;
  8.         location / {
  9.                 root /var/www/test.com/;
  10.                 index index.php index.html index.html;
  11.         }
  12.  
  13.         location /git/ {
  14.             auth_basic "Auth";
  15.             auth_basic_user_file /etc/nginx/htpasswd/gitrepo;
  16.             error_log /var/log/nginx/gitrepo.error.log;
  17.             access_log /var/log/nginx/gitrepo.access.log;
  18.  
  19.             root /home;
  20.        
  21.             include fastcgi_params;
  22.  
  23.             fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
  24.             fastcgi_param GIT_HTTP_EXPORT_ALL true;
  25.             fastcgi_param GIT_PROJECT_ROOT /home/git;
  26.             fastcgi_param PATH_INFO $uri;
  27.             fastcgi_param REMOTE_USER $remote_user;
  28.             fastcgi_pass unix:/var/run/fcgiwrap.socket;
  29.     }  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement