Gogs: Difference between revisions

From Leo's Notes
This page was last edited on 15 June 2020, at 00:17.
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..."
 
m Updated categories
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
Gogs is a light weight git server written in golang.
Gogs is a light weight git server written in golang.
* https://github.com/gogs/gogs
* https://gogs.io


== Apache ==
== Reverse Proxy with 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.
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.


Line 19: Line 21:
The {{code|RewriteRule}} directive can take a {{code|P}} flag that enables proxying (Make sure that {{code|mod_rewrite}}, {{code|mod_proxy}}, and {{code|mod_proxy_http}} is enabled)
The {{code|RewriteRule}} directive can take a {{code|P}} flag that enables proxying (Make sure that {{code|mod_rewrite}}, {{code|mod_proxy}}, and {{code|mod_proxy_http}} is enabled)


[[Category:Linux]]
 
[[Category:Containers]]
{{Navbox Web}}[[Category:WebApp]]
[[Category:Services]]
[[Category:Services]]

Latest revision as of 00:17, 15 June 2020

Gogs is a light weight git server written in golang.

Reverse Proxy with 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)