From 39d3785ebc7a281090b7e3e9ab5afcc1de4dcddb Mon Sep 17 00:00:00 2001 From: Nikolay Shaplov Date: Sun, 7 Jun 2026 14:35:02 +0000 Subject: [PATCH] Cleanup. Clean nginx config and remove compatibilint symlinks. --- cgi/gitai-cat-file.pl | 1 - cgi/gitai-log.pl | 1 - cgi/gitai-ls-tree.pl | 1 - cgi/gitai-show.pl | 1 - cgi/gitai.pl | 1 - conf/nginx/git4ai | 141 ------------------------------------------ 6 files changed, 146 deletions(-) delete mode 120000 cgi/gitai-cat-file.pl delete mode 120000 cgi/gitai-log.pl delete mode 120000 cgi/gitai-ls-tree.pl delete mode 120000 cgi/gitai-show.pl delete mode 120000 cgi/gitai.pl diff --git a/cgi/gitai-cat-file.pl b/cgi/gitai-cat-file.pl deleted file mode 120000 index 7de7d62..0000000 --- a/cgi/gitai-cat-file.pl +++ /dev/null @@ -1 +0,0 @@ -git4ai-cat-file.pl \ No newline at end of file diff --git a/cgi/gitai-log.pl b/cgi/gitai-log.pl deleted file mode 120000 index c765b9f..0000000 --- a/cgi/gitai-log.pl +++ /dev/null @@ -1 +0,0 @@ -git4ai-log.pl \ No newline at end of file diff --git a/cgi/gitai-ls-tree.pl b/cgi/gitai-ls-tree.pl deleted file mode 120000 index 9489a5d..0000000 --- a/cgi/gitai-ls-tree.pl +++ /dev/null @@ -1 +0,0 @@ -git4ai-ls-tree.pl \ No newline at end of file diff --git a/cgi/gitai-show.pl b/cgi/gitai-show.pl deleted file mode 120000 index e049d8b..0000000 --- a/cgi/gitai-show.pl +++ /dev/null @@ -1 +0,0 @@ -git4ai-show.pl \ No newline at end of file diff --git a/cgi/gitai.pl b/cgi/gitai.pl deleted file mode 120000 index 4ab2b52..0000000 --- a/cgi/gitai.pl +++ /dev/null @@ -1 +0,0 @@ -git4ai.pl \ No newline at end of file diff --git a/conf/nginx/git4ai b/conf/nginx/git4ai index 07c063a..57832aa 100644 --- a/conf/nginx/git4ai +++ b/conf/nginx/git4ai @@ -39,66 +39,6 @@ server { expires -1; } - - location /gitweb3/index.cgi { - root /usr/share/gitweb/; - include fastcgi_params; - gzip off; - - fastcgi_param LANG "en_US.UTF-8"; - fastcgi_param LC_ALL "en_US.UTF-8"; - fastcgi_param PERL_UNICODE "D"; # S=stdin/stdout UTF-8 (убрано), D=@ARGV UTF-8 - - fastcgi_param SCRIPT_NAME $uri; - fastcgi_param SCRIPT_FILENAME /usr/share/gitweb/index.cgi; - - fastcgi_param GITWEB_CONFIG /etc/gitweb.conf; - fastcgi_pass unix:/var/run/fcgiwrap.socket; - - # Не кешируем. Иначе колд айай начинает видеть старые версии вместо актуальных - add_header Cache-Control "no-store, no-cache, must-revalidate" always; - add_header Pragma "no-cache" always; - expires -1; - } - - location /gitweb3 { - root /usr/share/gitweb/; - # index index.cgi; - - try_files $uri /gitweb3/index.cgi$is_args$args; - - # Не кешируем. Иначе колд айай начинает видеть старые версии вместо актуальных - add_header Cache-Control "no-store, no-cache, must-revalidate" always; - add_header Pragma "no-cache" always; - expires -1; - } - - - -location ~ "^/raw/([^/]+)/([0-9a-f]{4,40})$" { - rewrite "^/raw/([^/]+)/([0-9a-f]{4,40})$" /?p=$1&a=blob_plain&h=$2 break; - proxy_pass http://127.0.0.1:80; - add_header Cache-Control "no-store, no-cache, must-revalidate" always; - expires -1; -} - - -location = /raw/ { - default_type text/plain; - return 200 "https://gitweb.nataraj.world/raw/articles.git/\n"; - add_header Cache-Control "no-store" always; -} - - - # Временная копия на то время пока не протух кеш -location /gitweb2/ { - proxy_pass http://127.0.0.1:80/; - add_header Cache-Control "no-store, no-cache, must-revalidate" always; - add_header Pragma "no-cache" always; - expires -1; -} - - # Если без nonce'а добавляем nonce. location ~ "^/git4ai-log/([^/]+)/([^/]+)/([^/]+)/([^/]+)$" { return 302 https://gitweb.nataraj.world/git4ai-log/$1/$2/$3/$4/$request_id; @@ -162,87 +102,6 @@ location ~ "^/git4ai[^/]*/([a-zA-Z0-9._-]+)/([a-zA-Z0-9._-]+|-)/([0-9a-f]{4,40}| expires -1; } -location ~ "^/gitai1/([^/]+)/([^/]+)$" { - return 302 https://gitweb.nataraj.world/gitai/$1/$2/r$request_id; - add_header Cache-Control "no-store" always; -} - -location ~ "^/gitai/([^/]+)/([^/]+)$" { - return 302 https://gitweb.nataraj.world/gitai/$1/$2/r$request_id; - add_header Cache-Control "no-store" always; -} - -location ~ "^/gitai/([a-zA-Z0-9._-]+)/([a-zA-Z0-9._-]+)/[a-zA-Z0-9]+$" { - fastcgi_pass unix:/var/run/fcgiwrap.socket; - fastcgi_param SCRIPT_FILENAME /srv/cgi/gitai.pl; - fastcgi_param GIT_REPO $1; - fastcgi_param GIT_BRANCH $2; - include fastcgi_params; - add_header Cache-Control "no-store, no-cache, must-revalidate" always; - expires -1; -} - -location ~ "^/gitai-log/([^/]+)/([^/]+)/([^/]+)$" { - return 302 https://gitweb.nataraj.world/gitai-log/$1/$2/$3/$request_id; - add_header Cache-Control "no-store" always; -} - -location ~ "^/gitai1-log/([^/]+)/([^/]+)/([^/]+)$" { - return 302 https://gitweb.nataraj.world/gitai-log/$1/$2/$3/$request_id; - add_header Cache-Control "no-store" always; -} - -location ~ "^/gitai-log/([a-zA-Z0-9._-]+)/([a-zA-Z0-9._-]+)/([0-9]+)/[a-zA-Z0-9]+$" { - fastcgi_pass unix:/var/run/fcgiwrap.socket; - fastcgi_param SCRIPT_FILENAME /srv/cgi/gitai-log.pl; - fastcgi_param GIT_REPO $1; - fastcgi_param GIT_BRANCH $2; - fastcgi_param GIT_OFFSET $3; - fastcgi_param REQUEST_ID $request_id; - include fastcgi_params; - add_header Cache-Control "no-store, no-cache, must-revalidate" always; - expires -1; -} - -location ~ "^/gitai-ls-tree/([a-zA-Z0-9._-]+)/([0-9a-f]{4,40})/([0-9]+)(?:/[a-zA-Z0-9]+)?$" { - fastcgi_pass unix:/var/run/fcgiwrap.socket; - fastcgi_param SCRIPT_FILENAME /srv/cgi/gitai-ls-tree.pl; - fastcgi_param GIT_REPO $1; - fastcgi_param GIT_COMMIT_ID $2; - fastcgi_param GIT_OFFSET $3; - include fastcgi_params; - add_header Cache-Control "no-store, no-cache, must-revalidate" always; - expires -1; -} - -location ~ "^/gitai-show/([^/]+)/([0-9a-f]{4,40})(?:/[a-zA-Z0-9]+)?$" { - fastcgi_pass unix:/var/run/fcgiwrap.socket; - fastcgi_param SCRIPT_FILENAME /srv/cgi/gitai-show.pl; - fastcgi_param GIT_REPO $1; - fastcgi_param GIT_COMMIT $2; - include fastcgi_params; - add_header Cache-Control "no-store, no-cache, must-revalidate" always; - expires -1; -} - -location ~ "^/gitai-cat-file/([^/]+)/([0-9a-f]{4,40})(?:/[a-zA-Z0-9]+)?$" { - fastcgi_pass unix:/var/run/fcgiwrap.socket; - fastcgi_param SCRIPT_FILENAME /srv/cgi/gitai-cat-file.pl; - fastcgi_param GIT_REPO $1; - fastcgi_param GIT_BLOB_ID $2; - include fastcgi_params; - add_header Cache-Control "no-store, no-cache, must-revalidate" always; - expires -1; -} - -#location ~ "^/gitai-raw/([^/]+)/([0-9a-f]{4,40})(?:/r[0-9]+)?$" { -# rewrite "^/gitai-raw/([^/]+)/([0-9a-f]{4,40})(?:/r[0-9]+)?$" /?p=$1&a=blob_plain&h=$2 break; -# proxy_pass http://127.0.0.1:80; -# add_header Cache-Control "no-store, no-cache, must-revalidate" always; -# expires -1; -#} - - location ~ ^/git(/.*) { fastcgi_pass unix:/var/run/fcgiwrap.socket; fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend; -- 2.47.3