server { listen 80 default_server; listen [::]:80 default_server;
root /var/www/html;
# Add index.php to the list if you are using PHP index index.html index.htm index.nginx-debian.html;
server_name _;
location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. #try_files $uri $uri/ =404; try_files $uri @cgit; ## 這邊要使用 cgit 的 CGI 程式來解譯路徑 }
# if you don't want that webcrawler (like google) index your site #robots=noindex, nofollow
root-title=Andas valiendo verga root-desc=r2's Git Repositories # if cgit messes up links, use a virtual-root. For example has cgit.example.org/ this value: virtual-root=/ #virtual-root=/cgit.cgi/ enable-http-clone=1 cache-scanrc-ttl=1 #remove-suffix=1 #branch-sort=age local-time=1 enable-blame=1 enable-commit-graph=1 enable-index-owner=1 enable-log-filecount=1 enable-log-linecount=1 max-stats=year max-commit-count=250 max-repo-count=250 snapshots=tar.gz tar.zst
# Specify some default clone urls using macro expansion #clone-url=http://myip/$CGIT_REPO_URL
# Highlight source code with python pygments-based highligher source-filter=/usr/lib/cgit/filters/syntax-highlighting.py
# Format markdown, restructuredtext, manpages, text files, and html files # through the right converters about-filter=/usr/lib/cgit/filters/about-formatting.sh
## ## Search for these files in the root of the default branch of repositories ## for coming up with the about page: ## 這邊如果沒安裝 python3-markdown 等套件的話README 仍然無法顯示 markdown 格式的喔 ##