commit 493d35809861b26d51721a7fb52cb2601cb04eeb
Author: mod <mod@buni.party>
Date: Sat Feb 21 04:15:54 2026 +0000
diff --git a/nginx/git.buni.party b/nginx/git.buni.party
new file mode 100644
index 0000000..dacddca
--- /dev/null
+++ b/nginx/git.buni.party
@@ -00 +128 @@
+server {
+ server_name git.buni.party;
+
+ location ~ ^(?!.*/(?:tree|commit|static|tag|grep|branch|show)/).*/objects/([0-9a-f]+/[0-9a-f]+|pack/pack-[0-9a-f]+\.(pack|idx))$ {
+ root /var/lib/gitolite3/repositories;
+ }
+
+ location ~ ^(?!.*/(?:tree|commit|static|tag|branch|grep|show)/).*/(HEAD|info/refs|objects/info/.*|git-(upload|receive)-pack)$ {
+ root /var/lib/gitolite3/repositories;
+ client_max_body_size 0;
+ fastcgi_param SCRIPT_FILENAME /usr/share/gitolite3/gitolite-shell;
+ include fastcgi_params;
+ fastcgi_param GIT_HTTP_EXPORT_ALL "";
+ fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite3/repositories;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ }
+
+ location / {
+ proxy_pass http://localhost:8090;
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $scheme;
+ }
+
+ listen 80;
+ listen [::]:80;
+}
diff --git a/nginx/u.buni.party b/nginx/u.buni.party
new file mode 100644
index 0000000..0796b40
--- /dev/null
+++ b/nginx/u.buni.party
@@ -00 +129 @@
+server {
+ server_name u.buni.party;
+ index index.html;
+
+ location = / {
+ return 301 /mod/;
+ }
+
+ # alias requests to correct uder directory
+ # don't reroute requests to /user/cgi-bin, however
+ location ~ ^/([^/]+)(?:/(?!cgi-bin/|noserv/)(.*))?$ {
+ alias /home/$1/web/$2;
+ }
+
+ location ~ ^/([^/]+)/cgi-bin/(.*)$ {
+ gzip off;
+ fastcgi_pass unix:/var/run/fcgiwrap.socket;
+ include /etc/nginx/fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME /home/$1/web/cgi-bin/$2;
+ }
+
+ # don't serve anything from noserv/
+ location ~ ^/[^/]+/noserv(?:/.*)?$ {
+ return 403;
+ }
+
+ listen 80;
+ listen [::]:80;
+}