52 lines
1.3 KiB
Text
Executable file
52 lines
1.3 KiB
Text
Executable file
server {
|
|
listen 80;
|
|
server_name _;
|
|
|
|
root /var/www/wordpress/web;
|
|
index index.html index.php;
|
|
|
|
access_log /var/log/angie/haikuatelier-access.log;
|
|
error_log /var/log/angie/haikuatelier-error.log;
|
|
|
|
# Remove X-Powered-By, which is an information leak
|
|
fastcgi_hide_header X-Powered-By;
|
|
|
|
# Point d'accès pour vérifier la santé du conteneur Angie.
|
|
location = /health {
|
|
access_log off;
|
|
add_header "Content-Type" "text/plain";
|
|
return 200 "UP";
|
|
}
|
|
|
|
location = /robots.txt {
|
|
log_not_found off;
|
|
access_log off;
|
|
}
|
|
|
|
location = /favicon.ico {
|
|
log_not_found off;
|
|
access_log off;
|
|
}
|
|
|
|
location ~ \.php$ {
|
|
fastcgi_pass wordpress:9000;
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
include /etc/angie/fastcgi.conf;
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location ~* .(jpg|jpeg|png|gif|ico|css|js)$ {
|
|
expires 365d;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.php?$args;
|
|
}
|
|
|
|
location * {
|
|
add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS";
|
|
add_header "Access-Control-Allow-Origin" "*";
|
|
add_header "Cross-Origin-Opener-Policy" "unsafe-none";
|
|
add_header "Cross-Origin-Resource-Policy" "cross-origin";
|
|
}
|
|
}
|