fiche
Installation des paquets requis¶
apt install nginx make gcc netcat
Création de l'arborescence¶
mkdir -p /opt/lstu/data
Installation¶
cd /opt/lstu/ && git clone https://github.com/solusipse/fiche.git app
cd app
make
make install
Unité systemD¶
- /etc/systemd/system/fiche.service
{{% notice note %}} Remplacer IP_PUB PORT DOMAIN {{% /notice %}}
{{% notice warning %}} n'oubliez pas d'ouvrir le port que vous avez choisi et/ou de le rediriger vers votre conteneur/vm {{% /notice %}}
[Unit]
Description=FICHE-SERVER
[Service]
ExecStart=/usr/local/bin/fiche -L IP_PUB -p PORT -d DOMAIN -S -o /opt/lstu/data -l /var/log/fiche.log -u root
[Install]
WantedBy=multi-user.target
systemctl daemon-reload
systemctl enable termbin.service
- /etc/nginx/sites-available/DOMAIN
server {
listen 80;
server_name DOMAIN;
charset utf-8;
location / {
root /opt/lstu/data/;
index index.txt index.html;
}
}
```bash
systemctl enable --now nginx
vhost pour le reverse proxy¶
server {
listen 80;
server_name DOMAIN;
return 301 https://DOMAIN$request_uri;
}
server {
listen 443 ssl http2;
server_name DOMAIN;
# Let's Encrypt:
ssl_certificate /etc/letsencrypt/live/DOMAIN/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/DOMAIN/privkey.pem;
# Add common Conf:
include /etc/nginx/RVPRX_common.conf;
# LOGS
gzip on;
access_log /var/log/nginx/DOMAIN_access.log;
error_log /var/log/nginx/DOMAIN_error.log;
location / {
proxy_pass http://IP_PRIV; }
}