PrivateBin instalieren
mkdir -p /var/www/privatebin chown -R $USER:$USER /var/www/privatebin cd /var/www/privatebin git clone https://github.com/PrivateBin/PrivateBin.git .
PrivateBin Konfigurieren
cp /var/www/privatebin/cfg/conf.sample.php /var/www/privatebin/cfg/conf.php
chown -R www-data:www-data /var/www/privatebin
nvim /var/www/privatebin/cfg/conf.php
[main]
name = "SarbsBin"
basepath = "https://bin.sarbs.xyz/"
discussion = true
opendiscussion = false
password = true
fileupload = false
burnafterreadingselected = false
defaultformatter = "plaintext"
sizelimit = 10485760
templateselection = false
template = "bootstrapS"
languageselection = false
languagedefault = "de"
; wenn das bootstrap5 theme genutz werden soll dann
cspheader = "default-src 'self'; base-uri 'self';
httpwarning = true
[model]
; Kann ich eine Speicherbegrenzung konfigurieren??
; name of data model class to load and directory for storage
; the default model "Filesystem" stores everything in the filesystem
class = Filesystem
[model_options]
dir = PATH "data"
# Benötige Empfehlungen:
; stay compatible with PrivateBin Alpha 0.19, less secure
; if enabled will use baseé4.js version 1.7 instead of 2.1.9 and shal instead of
; sha256 in HMAC for the deletion token
; zerobincompatibility = false
; Pick compression algorithm or disable it. Only applies to pastes/comments
; created after changing the setting.
; Can be set to one these values: "none" / "zlib" (default).
; compression = "zlib"
; maximum amount of expired pastes to delete in one purge
; Set this to O to disable purging. Set it higher, if you are running a large
; site
batchsize = 10
Vorraussetungen:
NGINX muss instaliert und Konfiguriert sein
Beim Registrar die DNS Records für Subdomain anlegen
bin.sarbs.xyz
PHP instalieren
apt install php-fpm php-common php-mbstring php-json php-curl apt install php8.2-gd
Überprüfe den richtigen Pfad in Deiner PHP-FPM-Konfiguration
/run/php/php8.2-fpm.sock
nvim /etc/nginx/sites-available/privatebin
server {
server_name bin.sarbs.xyz;
root /var/www/privatebin;
index index.php;
# Statische Dateien und Verzeichniszugriff
location / {
try_files $uri $uri/ =404;
}
# Verarbeitung von PHP-Dateien
location ~ \.php$ {
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/php8.2-fpm.sock; # Überprüfe den Socket-Pfad und passe ihn an Deine PHP-Version an
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
# Schutz von .ht-Dateien
location ~ /\.ht {
deny all;
}
# ACME-Challenge-Location
location ^~ /.well-known/acme-challenge/ {
default_type "text/plain";
try_files $uri =404;
}
}
:wq
mkdir /var/www/privatebin
ln -s /etc/nginx/sites-available/privatebin /etc/nginx/sites-enabled/ nginx -t systemctl restart nginx systemctl restart php8.2-fpm