# sudo rc-update add spawn-fcgi.fcgiwrap default
+If you also want a virtual host serving Git over HTTP, you can add a
+virtual host like:
+
+ server {
+ # http-git.example.com
+ listen 80;
+ server_name http-git.example.com;
+
+ access_log /var/log/nginx/http-git.example.com.access_log main;
+ error_log /var/log/nginx/http-git.example.com.error_log info;
+
+ location / {
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME /usr/libexec/git-core/git-http-backend;
+ fastcgi_param GIT_HTTP_EXPORT_ALL "";
+ fastcgi_param GIT_PROJECT_ROOT /var/git;
+ fastcgi_param PATH_INFO $document_uri;
+ fastcgi_pass unix:/var/run/fcgiwrap.sock-1;
+ }
+ }
+
+This uses the same FastCGI server we used for gitweb, but this time
+the backend CGI script is `git-http-backend`.
+
Wildcard virtual hosts
======================