Skip to content

Instantly share code, notes, and snippets.

View massar's full-sized avatar
:octocat:
Work work work work work... </rihanna>

Jeroen Massar massar

:octocat:
Work work work work work... </rihanna>
View GitHub Profile
@massar
massar / server-git.conf
Created March 6, 2014 21:14
Example nginx + git HTTP Smart mode (git-http-backend) + HTTP Authentication + HTTPS redirect
# Example nginx + git HTTP Smart mode (git-http-backend) + HTTP Authentication + HTTPS redirect
# jeroen@massar.ch - http://jeroen.massar.ch
server {
listen 192.0.1.1:80;
listen [2001:db8::1]:80;
# Redirect all non-HTTPS traffic to the HTTPS variant
return 301 https://$host$request_uri;
}