Skip to content

Instantly share code, notes, and snippets.

@luxwarp
Created August 20, 2019 21:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luxwarp/e9456e98a11ddb6948871d09b567c78d to your computer and use it in GitHub Desktop.
Save luxwarp/e9456e98a11ddb6948871d09b567c78d to your computer and use it in GitHub Desktop.
A typical Nginx server block for Gogs (Self hosted git service) https://gogs.io
# A typical Nginx server block for Gogs https://gogs.io
# Author: Mikael Luxwarp Carlsson luxwarp@codeiolo.org https://codeiolo.org
# License: ISC
# Created: 2019-08-20
server {
# Ports to listen to.
listen 80;
listen [::]:80;
# Server name to listen for.
server_name git.example.com;
# Proxy down traffic to running gogs server.
location / {
proxy_pass http://localhost:3000;
}
# Where to store logs for nginx traffic.
access_log /var/log/nginx/git.example.com.access.log;
error_log /var/log/nginx/git.example.com.error.log;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment