# 環境設定 SetEnv GIT_PROJECT_ROOT /var/git SetEnv GIT_HTTP_EXPORT_ALL ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/ # GitWeb Alias /gitweb /var/www/git Options +ExecCGI AddHandler cgi-script .cgi DirectoryIndex gitweb.cgi # アクセス制御 # LAN内の特定のホストのみ許可 Require all denied Require host localhost Require ip 127.0.0.1 Require ip 192.168.1.0/24 # Basic認証 AuthType Basic AuthName "Git Access" AuthUserFile /var/git/.htpasswd Require valid-user # 全開 # Require all granted