From 9e54416ae5e095ef5d47eb0c7a642894dddf46aa Mon Sep 17 00:00:00 2001 From: flu0r1ne Date: Wed, 21 Jul 2021 00:47:36 -0500 Subject: Rename posts -> logs --- pages/posts/cgit-nginx-ubuntu/cgit-nginx-ubuntu.md | 96 ---------------------- pages/posts/cgit-nginx-ubuntu/index.tsx | 12 --- 2 files changed, 108 deletions(-) delete mode 100644 pages/posts/cgit-nginx-ubuntu/cgit-nginx-ubuntu.md delete mode 100644 pages/posts/cgit-nginx-ubuntu/index.tsx (limited to 'pages/posts/cgit-nginx-ubuntu') diff --git a/pages/posts/cgit-nginx-ubuntu/cgit-nginx-ubuntu.md b/pages/posts/cgit-nginx-ubuntu/cgit-nginx-ubuntu.md deleted file mode 100644 index c225bd4..0000000 --- a/pages/posts/cgit-nginx-ubuntu/cgit-nginx-ubuntu.md +++ /dev/null @@ -1,96 +0,0 @@ -Installing cGit behind NGINX on Ubuntu -====================================== - -[cGit](https://git.zx2c4.com/cgit/about/) is a fast web interface based on the CGI specification. It is lightweight and doesn't require a database or web authentication system. - -It's easy to configure. For some reason, all the online guides for Ubuntu decided they needed to compile it from scratch and write their own start scripts in a mix of perl and bash. You don't need superhero sysadmin skills from the late 90s. All components are packaged with systemd units... there is a better way... - -### 1. Install `cgit` and `fcgiwrap`. - -`fcgiwrap` will create a socket NGINX can use to pass the CGI variables to cGit: -``` -sudo apt install fcgiwrap -sudo apt install cgit -``` - -### 2. Modify the `cgitrc` file under `/etc/cgitrc` to your liking: -``` -# See cgitrc(5) -# prepend this string to every url -virtual-root=/ -enable-index-links=1 -enable-commit-graph=1 - -root-title=My Git Repos -root-desc=I exclusivly write code in Smalltalk-71 -logo=/assets/my_custom_logo.png - -# Add site-specific configuration -# ... - -``` - -### 3. Optionally create an assets directory and add your custom logo / css: -``` -mkdir /var/www/html/assets -cp my_custom_logo.png /var/www/html/assets -``` - -### 4. Configure NGINX - -Add the site to NGINX. This launches the `cgit.cgi` executable passing it to the `fcgiwrap` socket: -```conf -echo >/etc/nginx/sites-available/cgit.conf < - ); -} \ No newline at end of file -- cgit v1.2.3