From fbc4caa788f0222b90011ffa1dfd3a5b29b7be54 Mon Sep 17 00:00:00 2001 From: VC Date: Fri, 5 Jul 2024 11:53:13 +0200 Subject: [PATCH] add web4 --- host_vars/web4.dmz.mateu.be.yml | 7 +++ .../templates/vhosts/ramage2022.fr.conf.j2 | 0 .../vhosts/web4.dmz.mateu.be.conf.j2 | 0 .../vhosts/www.ramage2022.fr.conf.j2 | 49 +++++++++++++++++++ 4 files changed, 56 insertions(+) create mode 100644 host_vars/web4.dmz.mateu.be.yml create mode 100644 roles/nginx/templates/vhosts/ramage2022.fr.conf.j2 create mode 100644 roles/nginx/templates/vhosts/web4.dmz.mateu.be.conf.j2 create mode 100644 roles/nginx/templates/vhosts/www.ramage2022.fr.conf.j2 diff --git a/host_vars/web4.dmz.mateu.be.yml b/host_vars/web4.dmz.mateu.be.yml new file mode 100644 index 0000000..07b465b --- /dev/null +++ b/host_vars/web4.dmz.mateu.be.yml @@ -0,0 +1,7 @@ +mariadb_root_pass: !vault | + $ANSIBLE_VAULT;1.1;AES256 + 36333636323539303936666138623630663562336539326562336132623663363865656431386630 + 3533643363386366346265396462653065376563326465340a653034313635393034323134636261 + 64313434363934623033326330303736363765333665343734383461636662346132313535393639 + 3463643330336463660a626630363630613566643937633931663239346435663533316238346335 + 36623464656433353931376633656334616534626434306361396435653137376363 diff --git a/roles/nginx/templates/vhosts/ramage2022.fr.conf.j2 b/roles/nginx/templates/vhosts/ramage2022.fr.conf.j2 new file mode 100644 index 0000000..e69de29 diff --git a/roles/nginx/templates/vhosts/web4.dmz.mateu.be.conf.j2 b/roles/nginx/templates/vhosts/web4.dmz.mateu.be.conf.j2 new file mode 100644 index 0000000..e69de29 diff --git a/roles/nginx/templates/vhosts/www.ramage2022.fr.conf.j2 b/roles/nginx/templates/vhosts/www.ramage2022.fr.conf.j2 new file mode 100644 index 0000000..9decea4 --- /dev/null +++ b/roles/nginx/templates/vhosts/www.ramage2022.fr.conf.j2 @@ -0,0 +1,49 @@ +## WP Sebicomics +server { + listen *:443 ssl http2; + listen [::]:443 ssl http2; + server_name web4.dmz.mateu.be; + access_log /var/log/nginx/www.ramage2022.fr.access.log combined; + access_log syslog:server=unix:/dev/log combined; + error_log /var/log/nginx/www.ramage2022.fr.error.log; + error_log syslog:server=unix:/dev/log; + ssl_certificate /etc/x509/web4.dmz.mateu.be/fullchain.cer; + ssl_certificate_key /etc/x509/web4.dmz.mateu.be/web4.dmz.mateu.be.key; + + root /srv/http/www.ramage2022.fr/; + index index.html index.htm index.php; + + client_max_body_size 512M; + + # couper les fichiers cachés + location ~* /(?:uploads|files)/.*\.php$ { + deny all; + } + + # Optimisation des images + location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ { + expires 1w; + log_not_found off; + } + + # Interprétation PHP + location ~ ^/(index).php(/.*)+ { + fastcgi_split_path_info ^(.+\.php)(/.*)$; + try_files $fastcgi_script_name =404; + fastcgi_ignore_headers Cache-Control Expires Set-Cookie; + fastcgi_pass unix:/var/run/php/php{{ php_version }}-fpm.sock; + fastcgi_read_timeout 60; + include fastcgi_params; + } + + location ~ \.php$ { + try_files $uri $uri/ =404; + fastcgi_pass unix:/var/run/php/php{{ php_version }}-fpm.sock; + fastcgi_read_timeout 60; + include fastcgi_params; + } + + location / { + try_files $uri $uri/ /index.php$uri?$args; + } +}