/etc/nginx/sites-available/default
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/public_html;
# Add index.php to the list if you are using PHP
index index.php
server_name _;
location / {
try_files $uri $uri/ index.php;
if ( !-e $request_filename ) {
rewrite ^/(.*)$ /index.php;
}
}
# pass PHP scripts to FastCGI server
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
# Do not log access to images
location ~ ^.+\.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
expires 30d;
access_log off;
}
}
/var/www/public_html/classes/Config.php
<?php
class Config {
public static $paths = [
'url' => 'https://paste.technikkultur-erfurt.de',
'base' => '',
'index' => '/index.php',
'views' => 'views/',
'assets' => '/assets/',
'pastes' => '/var/www/public_html/pastes/',
'help' => '/sa6o5irjtbhk',
];
public static $mysql = [
'host' => '10.3.0.100',
'user' => 'paste',
'pass' => 'XXXXXX',
'db' => 'paste'
];
# leave this empty to use mysql
# be sure to put this in a save location
public static $sqlite = null;
public static $table = 'paste';
public static $db;
public static $site_name = 'Technikkultur in Erfurt - Paste';
/etc/borgmatic/config.yaml
...
location:
# List of source directories to backup (required). Globs and
# tildes are expanded.
source_directories:
- /etc
- /home
- /root
- /var/log
- /var/www
...