diff options
| author | Physick <96335032+DegustatorPonos@users.noreply.github.com> | 2026-03-25 15:26:28 +0500 |
|---|---|---|
| committer | Physick <96335032+DegustatorPonos@users.noreply.github.com> | 2026-03-25 15:26:28 +0500 |
| commit | b9f1acb2e3eb12c4847e5f8486e156923b3d556e (patch) | |
| tree | a9b1ab0fc08c55cb7c51f3ecc4089a36d0b2b50d /nginx.conf | |
| parent | 9aea644abab44aaa3a3ae916abf66817e7fdecb6 (diff) | |
Diffstat (limited to 'nginx.conf')
| -rw-r--r-- | nginx.conf | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..2b96fa1 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,59 @@ +#user http; +worker_processes 1; + +#error_log logs/error.log; +#error_log logs/error.log notice; +#error_log logs/error.log info; + +#pid logs/nginx.pid; + + +# Load all installed modules +include modules.d/*.conf; + +events { + worker_connections 1024; +} + + +http { + include mime.types; + default_type application/octet-stream; + sendfile on; + keepalive_timeout 65; + # gzip on; + + server { + listen 510; + # server_name git.physick.ru; + # server_name 192.168.110.109; + + root /usr/share/cgit; + try_files $uri @cgit; + + location ~* ^/(cgit.(css|png|js|svg)|favicon.ico|robots.txt|cgit_bak.css|(switch|search).svg) { + root /usr/share/webapps/cgit; + expires 30d; + } + + + 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 /srv/git; + fastcgi_param HOME /srv/git; + fastcgi_pass unix:/run/fcgiwrap.sock; + } + + 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.sock; + } + } +} |
