Ahoj, na můj vpsfree debian jsem nainstaloval shellinabox a certbot apache, vygeneroval certifikáty lets encrypt, ale nemůžu rozchodit v shellinaboxu lets encrypt certifikát.
Pokoušel jsem se o 2 způsoby, jak rozchodit lets encrypt certifikát v shellinaboxu, bohužel neúspěšně.
1. první způsob (dle
https://vpsguide.net/tutorials/vps-tutorials/install-shellinabox-on-an-ubuntu-debian-vps/): přes mod proxy, ale v debianu stretch nemohu nainstalovat do apache mod proxy.
aptitude install -y libapache2-mod-proxy-html libxml2-dev
Nepodařilo se najít balík, jehož název nebo popis odpovídá „libapache2-mod-proxy-html“
Nelze provést některé akce, přerušuji
a2enmod http_proxy
ERROR: Module http_proxy does not exist!
2. způsob, co jsem zkoušel:
/etc/default/shellinabox
# Should shellinaboxd start automatically
SHELLINABOX_DAEMON_START=1
# TCP port that shellinboxd's webserver listens on
SHELLINABOX_PORT=4200
# Parameters that are managed by the system and usually should not need
# changing:
# SHELLINABOX_DATADIR=/var/lib/shellinabox
# SHELLINABOX_USER=shellinabox
# SHELLINABOX_GROUP=shellinabox
# Any optional arguments (e.g. extra service definitions). Make sure
# that that argument is quoted.
#
# Beeps are disabled because of reports of the VLC plugin crashing
# Firefox on Linux/x86_64.
SHELLINABOX_ARGS="--no-beep --cert=/etc/shellinabox/certs/"
nebo
/etc/default/shellinabox
# Should shellinaboxd start automatically
SHELLINABOX_DAEMON_START=1
# TCP port that shellinboxd's webserver listens on
SHELLINABOX_PORT=4200
# Parameters that are managed by the system and usually should not need
# changing:
# SHELLINABOX_DATADIR=/var/lib/shellinabox
# SHELLINABOX_USER=shellinabox
# SHELLINABOX_GROUP=shellinabox
# Any optional arguments (e.g. extra service definitions). Make sure
# that that argument is quoted.
#
# Beeps are disabled because of reports of the VLC plugin crashing
# Firefox on Linux/x86_64.
SHELLINABOX_ARGS="--no-beep"
SHELLINABOX_ARGS="--cert=/etc/shellinabox/certs/"
Dále jsem vytvořil soubor, který by mi měl pomoci vytvářet certifikát pro shelliabox, ze souborů, které používám na apachi od lets encrypt:
/etc/shellinabox/lets-renew.sh
#!/bin/bash
cat /etc/letsencrypt/live/vpsfree.dynv6.net/privkey.pem /etc/letsencrypt/live/vpsfree.dynv6.net/fullchain.pem >/etc/shellinabox/certs/certificate.pem
chown shellinabox:shellinabox /etc/shellinabox/certs
chmod 700 /etc/shellinabox/certs
chmod 600 /etc/shellinabox/certs/certificate.pem
exit 0
Vytvořil jsem tím etc/shellinabox/certs/certificate.pem
ls /etc/shellinabox/certs/
certificate.pem
a spustil shellinabox:
shellinaboxd
[ssl] Cannot read valid certificate from "certificate.pem"! Check file permissions and file format.
Nejede, tak jsem zkusil předat parametr přes -c, očekává se předání složky s certifikátem:
shellinaboxd -c /etc/shellinabox/certs/
[ssl] Cannot read valid certificate from "/etc/shellinabox/certs//certificate.pem"! Check file permissions and file format.
Kde dělám chybu?