aboutsummaryrefslogtreecommitdiff
path: root/nginx/homepage.conf
diff options
context:
space:
mode:
authorJack Jamison <jackqjamison@gmail.com>2026-07-02 23:45:58 -0400
committerJack Jamison <jackqjamison@gmail.com>2026-07-02 23:45:58 -0400
commit3edcb4557a0525c1a3923c2404069efdecea0403 (patch)
tree84d8230aea847007eb75be43671f6b0b9ca8d949 /nginx/homepage.conf
parent861af260e7ed5f667e0579c4b35aaf9c930c8c58 (diff)
cgit
Diffstat (limited to 'nginx/homepage.conf')
-rw-r--r--nginx/homepage.conf49
1 files changed, 30 insertions, 19 deletions
diff --git a/nginx/homepage.conf b/nginx/homepage.conf
index 4976a6c..57a1d58 100644
--- a/nginx/homepage.conf
+++ b/nginx/homepage.conf
@@ -1,6 +1,6 @@
# https server
server {
- server_name jackjamison.net www.jackjamison.net ;
+ server_name jackjamison.net www.jackjamison.net;
error_page 404 = /404.html;
location = /404.html {
@@ -26,26 +26,37 @@ server {
}
-# http redirect
+# git server
server {
- listen [::]:80 ;
- listen 80 ;
- server_name jackjamison.net *.jackjamison.net ;
-
- return 301 https://$host$request_uri;
-}
-
+ server_name git.jackjamison.net;
+ root /usr/share/cgit;
+ try_files $uri @cgit;
+
+ location ~ /.+/(info/refs|git-upload-pack) {
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
+ fastcgi_param PATH_INFO $uri;
+ fastcgi_param GIT_HTTP_EXPORT_ALL 1;
+ fastcgi_param GIT_PROJECT_ROOT /var/git;
+ fastcgi_param HOME /var/git;
+ fastcgi_pass unix:/run/fcgiwrap.socket;
+ }
-### jackjamison.xyz redirect
+ location @cgit {
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME /usr/lib/cgit/cgit.cgi;
+ fastcgi_param PATH_INFO $uri;
+ fastcgi_param QUERY_STRING $args;
+ fastcgi_param HTTP_HOST $server_name;
+ fastcgi_pass unix:/run/fcgiwrap.socket;
+ }
+}
-# https
+# http redirect
server {
- server_name jackjamison.xyz *.jackjamison.xyz ;
-
- listen [::]:80 ;
- listen 80 ;
- listen [::]:443 ssl;
- listen 443 ssl;
-
- return 301 https://jackjamison.net;
+ listen [::]:80;
+ listen 80;
+ server_name _;
+
+ return 301 https://$host$request_uri;
}