stunnel和fossil的安裝

1.sudo apt update 更新

2.sudo apt install stunnel4 -y 安裝stunnel14

3.sudo apt install fossil 安裝fossil

啟動設定:

進入/etc/environment中 改HTTPS=on

進入/etc/default/stunnel4中 改ENABLED=1

stunnel設定和fossil:

stunnel.conf

sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout localhost.key -out localhost.crt 建立local.key和local.crt

/etc/stunnel/stunnel.conf設定支援IPV6

[https] accept = :::443 cert = /etc/stunnel/localhost.crt key = /etc/stunnel/localhost.key exec = /usr/bin/fossil execargs = /usr/bin/fossil http /home/user/repository/mde2a1.fossil --https --nojail

--nojail 目的在 drop the root privilege but do not enter the chroot jail

重新啟動 stunnel4 則使用 /etc/init.d/stunnel4 restart

設定完成後, 重新開機即可以 https://yourip 連結至自己組別的主機 不過以上我有很多指令都看不懂...只能硬記