BarryServer : Git

All the code for all my projects
// BarryServer : Git / barryserver-git / blob / a6603d573a369feda0bc772d59bc48c3d1397442 / pages.conf

// Related

barryserver-git

Barry Splitting into more pages + commit pages a6603d5 (2 years, 3 months ago)
location /style.css {
	try_files $uri $uri/ =404;
}
location ~ ^/(tree|index|blob|commit|commits)\.php {
	include /etc/nginx/fastcgi.conf;
	fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
}
location / {
	rewrite ^/([^/]+)(/?)$ /tree.php?repo=$1;

	rewrite ^/([^/]+)/tree$ /tree.php?repo=$1;
	rewrite ^/([^/]+)/tree/([^/]*)(/?)$ /tree.php?repo=$1&object=$2;
	rewrite ^/([^/]+)/tree/([^/]*)/(.*)$ /tree.php?repo=$1&object=$2&path=$3;

	rewrite ^/([^/]+)/blob$ /blob.php?repo=$1;
	rewrite ^/([^/]+)/blob/([^/]*)(/?)$ /blob.php?repo=$1&object=$2;
	rewrite ^/([^/]+)/blob/([^/]*)/(.*)$ /blob.php?repo=$1&object=$2&path=$3;

	rewrite ^/([^/]+)/raw$ /blob.php?raw&repo=$1;
	rewrite ^/([^/]+)/raw/([^/]*)(/?)$ /blob.php?raw&repo=$1&object=$2;
	rewrite ^/([^/]+)/raw/([^/]*)/(.*)$ /blob.php?raw&repo=$1&object=$2&path=$3;

	rewrite ^/([^/]+)/commit$ /commit.php?repo=$1;
	rewrite ^/([^/]+)/commit/([^/]*)(/?)$ /commit.php?repo=$1&object=$2;
	rewrite ^/([^/]+)/commit/([^/]*)/(.*)$ /commit.php?repo=$1&object=$2&path=$3;

	rewrite ^/([^/]+)/commits$ /commits.php?repo=$1;
	rewrite ^/([^/]+)/commits/([^/]*)(/?)$ /commits.php?repo=$1&object=$2;
	rewrite ^/([^/]+)/commits/([^/]*)/(.*)$ /commits.php?repo=$1&object=$2&path=$3;

	try_files $uri $uri/ =404;
}