Gogs

From Leo's Notes
Revision as of 04:35, 4 April 2017 by Leo (talk | contribs) (Created page with "Gogs is a light weight git server written in golang. == Apache == Gogs will run on port 3000 by default. To serve gogs on the typical HTTP/HTTPS ports, make a virtual host on...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This page was last edited on 4 April 2017, at 04:35.

Gogs is a light weight git server written in golang.

Apache

Gogs will run on port 3000 by default. To serve gogs on the typical HTTP/HTTPS ports, make a virtual host on Apache serving a directory containing this .htaccess file.

DirectoryIndex disabled

RewriteEngine on

# Force https
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# Proxy
RewriteRule ^(.*)$ http://127.0.0.1:3000/$1 [P,L]

The RewriteRule directive can take a P flag that enables proxying (Make sure that mod_rewrite, mod_proxy, and mod_proxy_http is enabled)