gitea_pages/backend/templates/gitea_pages.conf

29 lines
437 B
Text
Raw Normal View History

2023-05-21 16:58:10 +00:00
map $host $subdomain {
~^(?P<sub>.+)\.{{ domain_segments|join("\\.") }}$ $sub;
}
server {
listen 80;
server_name *.{{ domain_segments|join(".") }};
root /var/www/repos/$subdomain;
location = / {
autoindex on;
}
location / {
try_files $uri $uri/ /index.html;
index index.html index.htm;
if (!-e $request_filename) {
return 404;
}
}
location ~ /\.git {
deny all;
return 404;
}
}