详细配置可参考:如何在 Debian 11 上使用 Nginx 安装 HTTP Git 服务器文章来源:https://www.toymoban.com/news/detail-629524.html
有两个配置NAS与linux系统不同:文章来源地址https://www.toymoban.com/news/detail-629524.html
fastcgi_param SCRIPT_FILENAME /var/packages/Git/target/libexec/git-core/git-http-backend;
fastcgi_pass unix:/run/fcgiwrap.sock;
server {
listen 8082;
# This is where the repositories live on the server
root /var/services/homes/user/git_repo;
access_log /var/services/homes/weishubin/DEV/logs/git-nginx-access.log;
error_log /var/services/homes/weishubin/DEV/logs/git-nginx-error.log;
location ~ (/.*) {
auth_basic "Git Login";
auth_basic_user_file /var/services/homes/user/DEV/htpasswd/passwd;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME /var/packages/Git/target/libexec/git-core/git-http-backend;
# export all repositories under GIT_PROJECT_ROOT
fastcgi_param GIT_HTTP_EXPORT_ALL "";
fastcgi_param GIT_PROJECT_ROOT /var/services/homes/user/git_repo;
# fastcgi_param GIT_PROJECT_ROOT /var/services/web/git_repo;
fastcgi_param REMOTE_USER $remote_user;
fastcgi_param PATH_INFO $1;
fastcgi_pass unix:/run/fcgiwrap.sock;
}
}
到了这里,关于在群晖NAS(DSM 7)使用 Nginx 安装 HTTP Git 服务器的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!