summaryrefslogtreecommitdiff
path: root/cgit/nginx.conf
diff options
context:
space:
mode:
authora73x <[email protected]>2024-08-25 10:04:00 +0100
committera73x <[email protected]>2024-08-25 10:04:00 +0100
commit911a7dc7296f76a5de0538b3c3536167a89195d8 (patch)
tree662014839ebed4077e066ed2b86b9e7a0c045185 /cgit/nginx.conf
parentd9ae1cb433a5fe66c3f64b15e5849d11a87d0c53 (diff)
add ui
Diffstat (limited to 'cgit/nginx.conf')
-rw-r--r--cgit/nginx.conf26
1 files changed, 26 insertions, 0 deletions
diff --git a/cgit/nginx.conf b/cgit/nginx.conf
new file mode 100644
index 0000000..592f2a0
--- /dev/null
+++ b/cgit/nginx.conf
@@ -0,0 +1,26 @@
+ server {
+ listen 80;
+ # server_name git.example.com;
+ root /usr/share/webapps/cgit;
+ try_files $uri @cgit;
+
+ # Configure HTTP transport
+ location ~ /.+/(info/refs|git-upload-pack) {
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root/cgit.cgi;
+ fastcgi_param PATH_INFO $uri;
+ fastcgi_param GIT_HTTP_EXPORT_ALL 1;
+ fastcgi_param GIT_PROJECT_ROOT /home/git;
+ fastcgi_param HOME /home/git;
+ fastcgi_pass unix:/run/fcgiwrap/fcgiwrap.socket;
+ }
+
+ location @cgit {
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME $document_root/cgit.cgi;
+ fastcgi_param PATH_INFO $uri;
+ fastcgi_param QUERY_STRING $args;
+ fastcgi_param HTTP_HOST $server_name;
+ fastcgi_pass unix:/run/fcgiwrap/fcgiwrap.socket;
+ }
+ }