Skip to content

Instantly share code, notes, and snippets.

@gsf
Created July 30, 2017 02:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gsf/f6a0973f23d34c536d8f973fee302756 to your computer and use it in GitHub Desktop.
Save gsf/f6a0973f23d34c536d8f973fee302756 to your computer and use it in GitHub Desktop.
cgit at subdirectory on nginx and uwsgi
css=/s/cgit.css
logo=/s/cgit.png
virtual-root=/s/
remove-suffix=1
scan-path=/srv/git/
server {
...
location /s/ {
alias /var/www/htdocs/cgit/;
try_files $uri @cgit;
}
location @cgit {
include uwsgi_params;
uwsgi_modifier1 9;
uwsgi_pass unix:/run/uwsgi/app/cgit/socket;
}
}
[uwsgi]
master = true
plugins = cgi
processes = 1
threads = 2
cgi = /s/=/var/www/htdocs/cgit/cgit.cgi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment