From 3069372fddc8f999d84a03e42e4b81e2f448a066 Mon Sep 17 00:00:00 2001 From: "e.medina" Date: Fri, 31 Oct 2025 11:28:29 +0100 Subject: [PATCH] Transfert de TDM --- debian13.md | 2 +- etc/apache2/sites-available/wp6_tdm.conf | 17 +++++++++++++++++ etc/apache2/sites-enabled/wp6_tdm.conf | 17 +++++++++++++++++ etc/caddy/Caddyfile | 10 ++++++++++ etc/group | 3 ++- etc/php/8.4/fpm/pool.d/wp6_tdm.conf | 10 ++++++++++ 6 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 etc/apache2/sites-available/wp6_tdm.conf create mode 100644 etc/apache2/sites-enabled/wp6_tdm.conf create mode 100644 etc/php/8.4/fpm/pool.d/wp6_tdm.conf diff --git a/debian13.md b/debian13.md index f089455..5a53d7b 100644 --- a/debian13.md +++ b/debian13.md @@ -133,5 +133,5 @@ _Non_ L'horloge système est-elle à l'heure universelle (UTC) ? _Non_ -Veuillez sélectionner pour redémarrer +Veuillez sélectionner pour redémarrer. Continuer diff --git a/etc/apache2/sites-available/wp6_tdm.conf b/etc/apache2/sites-available/wp6_tdm.conf new file mode 100644 index 0000000..86a0f06 --- /dev/null +++ b/etc/apache2/sites-available/wp6_tdm.conf @@ -0,0 +1,17 @@ + + ServerName https://www.tdm-pompes.com + DocumentRoot /home/tdm/wp6 + + + AllowOverride All + Options -Indexes + Require all granted + + + + SetHandler "proxy:unix:/run/php/php8.4-fpm-wp6_tdm.sock|fcgi://localhost/" + + + ErrorLog /var/log/apache2/wp6_tdm.error.log + CustomLog /var/log/apache2/wp6_tdm.access.log vhost_proxy_combined + diff --git a/etc/apache2/sites-enabled/wp6_tdm.conf b/etc/apache2/sites-enabled/wp6_tdm.conf new file mode 100644 index 0000000..86a0f06 --- /dev/null +++ b/etc/apache2/sites-enabled/wp6_tdm.conf @@ -0,0 +1,17 @@ + + ServerName https://www.tdm-pompes.com + DocumentRoot /home/tdm/wp6 + + + AllowOverride All + Options -Indexes + Require all granted + + + + SetHandler "proxy:unix:/run/php/php8.4-fpm-wp6_tdm.sock|fcgi://localhost/" + + + ErrorLog /var/log/apache2/wp6_tdm.error.log + CustomLog /var/log/apache2/wp6_tdm.access.log vhost_proxy_combined + diff --git a/etc/caddy/Caddyfile b/etc/caddy/Caddyfile index 39dd16e..63f6e31 100644 --- a/etc/caddy/Caddyfile +++ b/etc/caddy/Caddyfile @@ -11,5 +11,15 @@ import /etc/caddy/eureka.caddy import /etc/caddy/neotech.caddy import /etc/caddy/phpmyadmin_neotech.caddy +www.tdm-pompes.com { + @badbots header_regexp badbots User-Agent "(?i)(BLEXBot|GPTBot|YandexBot|MJ12bot)" + respond @badbots 403 + + reverse_proxy localhost:8000 { + header_up X-Forwarded-Proto {scheme} + header_up X-Forwarded-For {remote_host} + } +} + # Refer to the Caddy docs for more information: # https://caddyserver.com/docs/caddyfile \ No newline at end of file diff --git a/etc/group b/etc/group index c4493a9..4395eb4 100644 --- a/etc/group +++ b/etc/group @@ -46,7 +46,7 @@ kvm:x:993: render:x:992: netdev:x:101: _ssh:x:102: -sftp:x:990:eureka,neotech +sftp:x:990:eureka,neotech,tdm eureka:x:1000: neotech:x:1001: mysql:x:103: @@ -55,3 +55,4 @@ caddy:x:991: msmtp:x:105: prometheus:x:106: messagebus:x:989: +tdm:x:1002: diff --git a/etc/php/8.4/fpm/pool.d/wp6_tdm.conf b/etc/php/8.4/fpm/pool.d/wp6_tdm.conf new file mode 100644 index 0000000..aefdff8 --- /dev/null +++ b/etc/php/8.4/fpm/pool.d/wp6_tdm.conf @@ -0,0 +1,10 @@ +[wp6_tdm] +user = tdm +group = tdm + +listen = /run/php/php8.4-fpm-wp6_tdm.sock +listen.owner = www-data +listen.group = www-data + +pm = ondemand +pm.max_children = 10