50 lines
1.1 KiB
Plaintext
50 lines
1.1 KiB
Plaintext
server {
|
|
include sourcehut.conf;
|
|
include port80.conf;
|
|
server_name $gitsrht;
|
|
}
|
|
|
|
server {
|
|
include sourcehut.conf;
|
|
include port443.conf;
|
|
server_name $gitsrht;
|
|
|
|
ssl_certificate /etc/ssl/uacme/$gitsrht/cert.pem;
|
|
ssl_certificate_key /etc/ssl/uacme/private/$gitsrht/key.pem;
|
|
client_max_body_size 100M;
|
|
|
|
location / {
|
|
proxy_pass http://127.0.0.1:5001;
|
|
include web.conf;
|
|
}
|
|
|
|
location /query {
|
|
proxy_pass http://127.0.0.1:5101;
|
|
include graphql.conf;
|
|
}
|
|
|
|
location /static {
|
|
root /usr/lib/$python/site-packages/gitsrht;
|
|
expires 30d;
|
|
}
|
|
|
|
location = /authorize {
|
|
proxy_pass http://127.0.0.1:5001;
|
|
proxy_pass_request_body off;
|
|
proxy_set_header Content-Length "";
|
|
proxy_set_header X-Original-URI $request_uri;
|
|
}
|
|
|
|
location ~ ^/([^/]+)/([^/]+)/(HEAD|info/refs|objects/info/.*|git-upload-pack).*$ {
|
|
auth_request /authorize;
|
|
root /var/lib/git;
|
|
fastcgi_pass unix:/run/fcgiwrap/fcgiwrap.sock;
|
|
fastcgi_param SCRIPT_FILENAME /usr/libexec/git-core/git-http-backend;
|
|
fastcgi_param PATH_INFO $uri;
|
|
fastcgi_param GIT_PROJECT_ROOT $document_root;
|
|
fastcgi_read_timeout 500s;
|
|
include fastcgi_params;
|
|
gzip off;
|
|
}
|
|
}
|