From d03619fc2ac6c7e66432277ae4098db9274cd0b1 Mon Sep 17 00:00:00 2001 From: Jack Jamison Date: Wed, 8 Jul 2026 19:33:13 -0400 Subject: cgit css --- configuration/nginx/homepage.conf | 69 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 configuration/nginx/homepage.conf (limited to 'configuration/nginx/homepage.conf') diff --git a/configuration/nginx/homepage.conf b/configuration/nginx/homepage.conf new file mode 100644 index 0000000..1095107 --- /dev/null +++ b/configuration/nginx/homepage.conf @@ -0,0 +1,69 @@ +# https server +server { + server_name jackjamison.net www.jackjamison.net; + + error_page 404 = /404.html; + location = /404.html { + internal; + root /var/www/homepage/404.html; + } + + location /interactive { + alias /var/www/interactive/; + } + + location / { + root /var/www/homepage; + index index.html; + } + + listen [::]:443 ssl; + listen 443 ssl; + ssl_certificate /etc/letsencrypt/live/jackjamison.net/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/jackjamison.net/privkey.pem; + include /etc/letsencrypt/options-ssl-nginx.conf; + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; +} + +# git server +server { + server_name git.jackjamison.net; + root /usr/share/cgit; + try_files $uri @cgit; + + # http cloning + 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_PROJECT_ROOT /var/git/repositories; + fastcgi_param HOME /var/git/repositories; + fastcgi_pass unix:/run/fcgiwrap.socket; + } + + # else + 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; + } + + listen [::]:443 ssl; + listen 443 ssl; + ssl_certificate /etc/letsencrypt/live/git.jackjamison.net/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/git.jackjamison.net/privkey.pem; + include /etc/letsencrypt/options-ssl-nginx.conf; + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; +} + +# http redirect +server { + listen [::]:80 default_server; + listen 80 default_server; + server_name _; + + return 301 https://$host$request_uri; +} \ No newline at end of file -- cgit v1.2.3