The nginx
configuration snippet is
location ~ /(.*)$ {
location ~ ^/(.*/(config\.seed|sha256sums|sha256sums\.gpg|Packages|Packages\.gpg|Packages\.manifest|Packages\.sig))$ {
default_type text/plain;
alias /home/mirror/downloads/$1;
}
alias /home/mirror/downloads/$1;
index /dir-index.cgi/$1;
autoindex on;
location ~ /dir-index\.cgi/(.*)$ {
fastcgi_pass unix:/var/run/fcgiwrap.socket;
fastcgi_index dir-index.cgi;
fastcgi_param PATH_INFO $1;
fastcgi_param SCRIPT_FILENAME /usr/local/bin/dir-index.cgi;
include fastcgi_params;
}
}
The directory listing script (/usr/local/bin/dir-index.cgi
) can be found here: