cgit-config

My cgit configuration.
git clone https://git.sr.ht/~jbauer/cgit-config
Log | Files | Refs | LICENSE

nginx.conf (1041B)


      1 user www-data;
      2 worker_processes auto;
      3 pid /run/nginx.pid;
      4 include /etc/nginx/modules-enabled/*.conf;
      5 
      6 events {
      7 	worker_connections 1024;
      8 }
      9 
     10 http {
     11 	include /etc/nginx/mime.types;
     12 	default_type application/octet-stream;
     13 	sendfile on;
     14 	keepalive_timeout 65;
     15 	gzip on;
     16 	tcp_nopush on;
     17 	tcp_nodelay on;
     18 	types_hash_max_size 2048;
     19 
     20 	error_log /var/log/nginx/error.log;
     21 
     22 	#Cgit
     23 	server {
     24 		listen 80;
     25 		server_name git.paritybit.ca;
     26 		root /usr/share/cgit;
     27 		try_files $uri @cgit;
     28 
     29 		location ~ /~jbauer(.*) {
     30 			include fastcgi_params;
     31 			fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
     32 			fastcgi_param GIT_HTTP_EXPORT_ALL "";
     33 			fastcgi_param GIT_PROJECT_ROOT /srv/git/;
     34 			fastcgi_param PATH_INFO $1;
     35 			fastcgi_pass  unix:/var/run/fcgiwrap.socket;
     36 		}
     37 
     38 		location @cgit {
     39 			include fastcgi_params;
     40 			fastcgi_param SCRIPT_FILENAME /usr/lib/cgit/cgit.cgi;
     41 			fastcgi_param PATH_INFO	$uri;
     42 			fastcgi_param QUERY_STRING $args;
     43 			fastcgi_param HTTP_HOST $server_name;
     44 			fastcgi_pass  unix:/var/run/fcgiwrap.socket;
     45 		}
     46 	}
     47 }