summaryrefslogtreecommitdiff
path: root/guides/cloud/vps.org
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2021-08-04 21:40:19 +0200
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2021-08-04 21:40:19 +0200
commit1e2ac9d1992335e672df8a27b71faa1cef3ce564 (patch)
treed6839d7884831cae615105e68a2aab4fc7ac9b47 /guides/cloud/vps.org
parentc772c5a5c7f8dddd39cefdb2522ee0850f256756 (diff)
downloadmemory-leaks-1e2ac9d1992335e672df8a27b71faa1cef3ce564.tar.xz
Note down setup for Git services on VPS
Slightly redundant with guides/cloud/git.org; trying to simplify things (e.g. let --shared=group handle the setgid shenanigans).
Diffstat (limited to 'guides/cloud/vps.org')
-rw-r--r--guides/cloud/vps.org18
1 files changed, 16 insertions, 2 deletions
diff --git a/guides/cloud/vps.org b/guides/cloud/vps.org
index f097ee8..1224a17 100644
--- a/guides/cloud/vps.org
+++ b/guides/cloud/vps.org
@@ -43,7 +43,8 @@ So instead, I'll
sudo hostnamectl set-hostname $fqdn
#+end_src
-* Web server
+* Services
+** Web server
Run ~sudo apt install nginx~; then, in
=/etc/nginx/sites-available/$FQDN=:
#+begin_src conf
@@ -65,7 +66,7 @@ server {
Use one =access_log= file per site, to simplify analytics.
Run ~sudo systemctl restart nginx~.
-** fail2ban
+*** fail2ban
With the following files in =$HOME=:
#+begin_src conf
# nginx-botsearch.local
@@ -99,3 +100,16 @@ sudo systemctl restart fail2ban
Check how these rules fare against real bot searches with
~fail2ban-regex /var/log/nginx/access.log
/etc/fail2ban/filter.d/nginx-botsearch.local~.
+** Git server
+*** SSH access
+#+begin_src sh
+$ sudo apt install git
+$ sudo tee -a /etc/shells <<< $(which git-shell)
+$ sudo adduser git --disabled-password --shell $(which git-shell)
+$ sudo mkdir /srv/git
+$ sudo chown git:git /srv/git
+# For every new repo:
+$ sudo -u git git init --bare --shared=group /srv/git/${repo}
+#+end_src
+
+*** TODO Web mirror