Features: - PHP 8.4 support (from 8.3) - WordPress 7.0 (auto-update via WP-CLI) - Modern TLS 1.3 cipher suites (2026 best practices) - Fail2Ban security integration (5 jails: SSH, Nginx, WordPress, recidive) - Auto-update cron job for WordPress (weekly Minor updates) - Debian 14 Forky support (testing) - Ubuntu 25.04 support - Python 3.12 in GitHub Actions Security: - Fail2Ban with SSH brute force protection (24h ban) - WordPress wp-login.php protection (2h ban) - Nginx bot scanner protection - Recidive jail for repeat offenders (1 week ban) - Modern TLS ciphers (AEAD only) - HSTS 2 years for preload Documentation: - docs/autoupdate.md - WordPress auto-update guide - docs/fail2ban.md - Fail2Ban configuration guide - docs/troubleshooting.md - Updated with php_version variable Breaking changes: - PHP 8.4 is now the default (requires Ubuntu 20.04+ or Debian 11+)
92 lines
3.7 KiB
Django/Jinja
Executable File
92 lines
3.7 KiB
Django/Jinja
Executable File
<?php
|
|
/**
|
|
* WordPress-Konfigurationsdatei
|
|
* Generiert durch Ansible
|
|
*/
|
|
|
|
// ** MySQL-Einstellungen ** //
|
|
define( 'DB_NAME', '{{ wordpress_db_name }}' );
|
|
define( 'DB_USER', '{{ wordpress_db_user }}' );
|
|
define( 'DB_PASSWORD', '{{ wordpress_db_password }}' );
|
|
define( 'DB_HOST', 'localhost' );
|
|
define( 'DB_CHARSET', 'utf8mb4' );
|
|
define( 'DB_COLLATE', '' );
|
|
|
|
{% if enable_redis is defined and enable_redis %}
|
|
// ** Redis Object Cache Konfiguration ** //
|
|
define( 'WP_REDIS_HOST', '127.0.0.1' );
|
|
define( 'WP_REDIS_PORT', 6379 );
|
|
{% if redis_password is defined and redis_password %}
|
|
define( 'WP_REDIS_PASSWORD', '{{ redis_password }}' );
|
|
{% endif %}
|
|
define( 'WP_REDIS_DATABASE', {{ redis_database | default('0') }} );
|
|
define( 'WP_REDIS_TIMEOUT', {{ redis_timeout | default('1') }} );
|
|
define( 'WP_REDIS_READ_TIMEOUT', {{ redis_read_timeout | default('1') }} );
|
|
define( 'WP_CACHE', true );
|
|
{% endif %}
|
|
|
|
// ** Performance Optimierungen ** //
|
|
define( 'WP_MEMORY_LIMIT', '{{ wp_memory_limit | default('256M') }}' );
|
|
define( 'WP_MAX_MEMORY_LIMIT', '{{ wp_max_memory_limit | default('512M') }}' );
|
|
|
|
// Cron-Optimierung
|
|
{% if disable_wp_cron | default(true) %}
|
|
define( 'DISABLE_WP_CRON', true );
|
|
{% endif %}
|
|
|
|
// Autosave-Intervall (in Sekunden)
|
|
define( 'AUTOSAVE_INTERVAL', {{ wp_autosave_interval | default('300') }} );
|
|
|
|
// Post-Revisionen begrenzen
|
|
define( 'WP_POST_REVISIONS', {{ wp_post_revisions | default('3') }} );
|
|
|
|
// Papierkorb-Aufbewahrung (in Tagen)
|
|
define( 'EMPTY_TRASH_DAYS', {{ wp_empty_trash_days | default('7') }} );
|
|
|
|
{% if enable_nginx_cache | default(false) %}
|
|
// FastCGI Cache Unterstützung
|
|
define( 'WP_CACHE_KEY_SALT', '{{ domain_name | default('localhost') }}' );
|
|
{% endif %}
|
|
|
|
// ** Authentifizierungs-Schlüssel und Salts ** //
|
|
define( 'AUTH_KEY', '{{ ansible_date_time.epoch }}put your unique phrase here{{ ansible_hostname }}' );
|
|
define( 'SECURE_AUTH_KEY', '{{ ansible_date_time.epoch }}put your unique phrase here{{ ansible_hostname }}2' );
|
|
define( 'LOGGED_IN_KEY', '{{ ansible_date_time.epoch }}put your unique phrase here{{ ansible_hostname }}3' );
|
|
define( 'NONCE_KEY', '{{ ansible_date_time.epoch }}put your unique phrase here{{ ansible_hostname }}4' );
|
|
define( 'AUTH_SALT', '{{ ansible_date_time.epoch }}put your unique phrase here{{ ansible_hostname }}5' );
|
|
define( 'SECURE_AUTH_SALT', '{{ ansible_date_time.epoch }}put your unique phrase here{{ ansible_hostname }}6' );
|
|
define( 'LOGGED_IN_SALT', '{{ ansible_date_time.epoch }}put your unique phrase here{{ ansible_hostname }}7' );
|
|
define( 'NONCE_SALT', '{{ ansible_date_time.epoch }}put your unique phrase here{{ ansible_hostname }}8' );
|
|
|
|
// ** WordPress Tabellen-Präfix ** //
|
|
$table_prefix = 'wp_';
|
|
|
|
// ** Debugging ** //
|
|
define( 'WP_DEBUG', false );
|
|
define( 'WP_DEBUG_LOG', false );
|
|
define( 'WP_DEBUG_DISPLAY', false );
|
|
|
|
// ** WordPress-URLs ** //
|
|
{% if ssl_enabled | default(false) %}
|
|
define( 'WP_HOME', 'https://{{ domain_name }}' );
|
|
define( 'WP_SITEURL', 'https://{{ domain_name }}' );
|
|
{% else %}
|
|
define( 'WP_HOME', 'http://{{ domain_name }}{% if ansible_port is defined and ansible_port != 22 and ansible_port != 80 %}:{{ ansible_port }}{% endif %}' );
|
|
define( 'WP_SITEURL', 'http://{{ domain_name }}{% if ansible_port is defined and ansible_port != 22 and ansible_port != 80 %}:{{ ansible_port }}{% endif %}' );
|
|
{% endif %}
|
|
|
|
// ** Weitere Einstellungen ** //
|
|
define( 'AUTOMATIC_UPDATER_DISABLED', false );
|
|
define( 'WP_AUTO_UPDATE_CORE', true );
|
|
define( 'FS_METHOD', 'direct' );
|
|
|
|
/* Das war's, Schluss mit dem Bearbeiten! Viel Spaß beim Bloggen. */
|
|
|
|
/** Absolute Pfad zum WordPress-Verzeichnis. */
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
define( 'ABSPATH', __DIR__ . '/' );
|
|
}
|
|
|
|
/** Lädt die WordPress-Variablen und -Dateien. */
|
|
require_once ABSPATH . 'wp-settings.php';
|