/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 _;
# Maximum POST-size and Buffer
client_max_body_size 20M;
client_body_buffer_size 128K;
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location / {
# This is cool because no php is touched for static content.
# include the "?$args" part so non-default permalinks doesn't break when using query string
try_files $uri $uri/ /index.php?$args;
}
# pass PHP scripts to FastCGI server
location ~ \.php$ {
#NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
include fastcgi_params;
fastcgi_intercept_errors on;
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
#The following parameter can be also included in fastcgi_params file
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires max;
log_not_found off;
}
}
/etc/php/8.2/fpm/conf.d/99-local.ini
post_max_size = 20M upload_max_filesize = 20M
/var/www/public_html/wp-config.php
/** The name of the database for WordPress */ define( 'DB_NAME', 'wordpress_technikkultur' ); /** MySQL database username */ define( 'DB_USER', 'XXXXXXXXX' ); /** MySQL database password */ define( 'DB_PASSWORD', 'XXXXXXXXXX' ); /** MySQL hostname */ define( 'DB_HOST', '10.3.0.100' ); /** Database Charset to use in creating database tables. */ define( 'DB_CHARSET', 'utf8' ); /** The Database Collate type. Don't change this if in doubt. */ define( 'DB_COLLATE', '' );
/var/www/public_html/wp-config.php
define('AUTH_KEY', '****************************************************************');
define('SECURE_AUTH_KEY', '****************************************************************');
define('LOGGED_IN_KEY', '****************************************************************');
define('NONCE_KEY', '****************************************************************');
define('AUTH_SALT', '****************************************************************');
define('SECURE_AUTH_SALT', '****************************************************************');
define('LOGGED_IN_SALT', '****************************************************************');
define('NONCE_SALT', '****************************************************************');
/var/www/public_html/wp-config.php
...
/* Accept SSL behind proxy */
if (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
$_SERVER['HTTPS'] = 'on';
}
/* Use X-Forwarded-For HTTP Header to get visitors Real IP Address */
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$http_x_headers = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
$_SERVER['REMOTE_ADDR'] = $http_x_headers[0];
}
/** Sets up WordPress vars and included files. */
require_once ABSPATH . 'wp-settings.php';
/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
...