From 3d4da5ac6000a4871c5caa80d1e61f2782da3069 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Sat, 2 Dec 2023 23:27:35 -0600 Subject: feat: finish converting md to org --- blog/2023-09-15-gitweb.org | 76 +++++++++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 34 deletions(-) (limited to 'blog/2023-09-15-gitweb.org') diff --git a/blog/2023-09-15-gitweb.org b/blog/2023-09-15-gitweb.org index 9179d70..22c4c27 100644 --- a/blog/2023-09-15-gitweb.org +++ b/blog/2023-09-15-gitweb.org @@ -1,39 +1,44 @@ -+++ -date = 2023-09-16T03:10:37+00:00 -title = "GitWeb via Nginx" -description = "A short guide on how to serve GitWeb via Nginx." -+++ +#+title: GitWeb via Nginx +#+date: 2023-09-16 -## Overview +** Overview +:PROPERTIES: +:CUSTOM_ID: overview +:END: +[[https://git-scm.com/book/en/v2/Git-on-the-Server-GitWeb][GitWeb]] is a +simple web-based visualizer for git repositories. By default, GitWeb +will only run with the =lighttpd= or =webrick= web servers. -[GitWeb](https://git-scm.com/book/en/v2/Git-on-the-Server-GitWeb) is a simple -web-based visualizer for git repositories. -By default, GitWeb will only run with the `lighttpd` or `webrick` web servers. - -However, this guide will show you how to keep GitWeb running in the background -and display information for all repositories in a chosen directory. +However, this guide will show you how to keep GitWeb running in the +background and display information for all repositories in a chosen +directory. See below for the final result: -![Gitweb](https://img.cleberg.net/blog/20230915-gitweb/gitweb.png "Gitweb") - -## Install Dependencies +#+caption: Gitweb +[[https://img.cleberg.net/blog/20230915-gitweb/gitweb.png]] +** Install Dependencies +:PROPERTIES: +:CUSTOM_ID: install-dependencies +:END: To start, you'll need install the following packages: -```sh +#+begin_src sh sudo apt install git gitweb fcgiwrap nginx -``` - -## Configure Nginx +#+end_src +** Configure Nginx +:PROPERTIES: +:CUSTOM_ID: configure-nginx +:END: Once installed, create an Nginx configuration file. -```sh +#+begin_src sh sudo nano /etc/nginx/sites-available/git.example.com -``` +#+end_src -```conf +#+begin_src conf server { listen 80; server_name example.com; @@ -52,23 +57,26 @@ server { index index.cgi; } } -``` +#+end_src -To make the configuration active, you need to symlink it and then restart Nginx. +To make the configuration active, you need to symlink it and then +restart Nginx. -```sh +#+begin_src sh sudo ln -s /etc/nginx/sites-available/git.example.com /etc/nginx/sites-enabled/git.example.com sudo systemctl restart nginx.service -``` - -The GitWeb application should now be available via the URL you set in the Nginx -configuration above. +#+end_src -## Customize GitWeb +The GitWeb application should now be available via the URL you set in +the Nginx configuration above. -If you need to, you can customize many things about Gitweb by editing the -[gitweb.conf](https://git-scm.com/docs/gitweb.conf) file. +** Customize GitWeb +:PROPERTIES: +:CUSTOM_ID: customize-gitweb +:END: +If you need to, you can customize many things about Gitweb by editing +the [[https://git-scm.com/docs/gitweb.conf][gitweb.conf]] file. -```sh +#+begin_src sh sudo nano /etc/gitweb.conf -``` +#+end_src -- cgit v1.2.3-70-g09d2