aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'config/nginx.conf')
-rw-r--r--config/nginx.conf57+57 −0
1 files changed, 57 insertions, 0 deletions
diff --git a/config/nginx.conf b/config/nginx.conf
new file mode 100644
--- /dev/null
+++ b/config/nginx.conf
@@ -0,0 +1,57 @@
+# SPDX-FileCopyrightText: 2026 Nikolay Govorov
+# SPDX-License-Identifier: AGPL-3.0-or-later
+
+user git git;
+worker_processes auto;
+error_log /dev/stderr info;
+pid /run/gilti/nginx.pid;
+
+events {
+ worker_connections 256;
+}
+
+http {
+ include /etc/nginx/mime.types;
+ default_type application/octet-stream;
+ access_log /dev/stdout;
+ sendfile on;
+ server_tokens off;
+ client_max_body_size 1m;
+ client_body_timeout 10s;
+ keepalive_timeout 30s;
+
+ server {
+ listen 8080;
+ server_name _;
+
+ location = /healthz {
+ access_log off;
+ default_type text/plain;
+ return 200 "ok\n";
+ }
+
+ location = /cgit.css {
+ alias /usr/share/webapps/cgit/cgit.css;
+ }
+
+ location = /cgit.png {
+ alias /usr/share/webapps/cgit/cgit.png;
+ }
+
+ location = /favicon.ico {
+ alias /usr/share/webapps/cgit/favicon.ico;
+ }
+
+ location / {
+ limit_except GET HEAD { deny all; }
+
+ include /etc/nginx/fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME /usr/share/webapps/cgit/cgit.cgi;
+ fastcgi_param PATH_INFO $uri;
+ fastcgi_param QUERY_STRING $args;
+ fastcgi_param HTTP_HOST $host;
+ fastcgi_pass unix:/run/gilti/fcgiwrap.sock;
+ fastcgi_read_timeout 30s;
+ }
+ }
+}