Skip to content

pastebin

Installation des paquets nécessaires

sudo apt install php7.3 apache2 libsodium23 libsodium-dev php-defuse-php-encryption mcrypt libgtk-dotnet3.0-cil

On récupère l'archive

wget https://github.com/PrivateBin/PrivateBin/archive/1.3.5.tar.gz
tar xvf 1.3.5.tar.gz
sudo mv PrivateBin-1.3.5 /var/www/html/privatebin
rm -rf 1.3.5.tar.gz PrivateBin-1.3.5

Configuration

sudo chown -R www-data:www-data /var/www/html/privatebin
cd /var/www/html/privatebin/cfg
sudo cp conf.sample.php conf.php
  • 🖊 Editer le fichier /var/www/html/privatebin/cfg/conf.php avec vos préférences

le vhost apache

<VirtualHost *:80>

    ServerAdmin webmaster@localhost
    ServerName FQDN
    DocumentRoot /var/www/html/privatebin

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

le vhost nginx en subdirectory

server {

    listen 80 ;
    server_name URL;


    location /SUBDIR {
      # Path to source
      alias /var/www/html/privatebin/;


      index index.php;
      try_files $uri $uri/ index.php;
        location ~ [^/]\.php(/|$) {
        fastcgi_split_path_info ^(.+?\.php)(/.*)$;
        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;

        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param REMOTE_USER     $remote_user;
        fastcgi_param PATH_INFO       $fastcgi_path_info;
        fastcgi_param SCRIPT_FILENAME $request_filename;
      }
    }
}

Redémarrage

sudo systemctl reboot