41 lines
863 B
Django/Jinja
41 lines
863 B
Django/Jinja
server {
|
|
{% include './templates/header.conf.j2' %}
|
|
root /srv/http/blog.libertus.eu/;
|
|
index index.html index.htm index.php;
|
|
|
|
## Optimisation des images
|
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
|
|
expires 2w;
|
|
log_not_found off;
|
|
}
|
|
|
|
## blocage équivalent HTTPS
|
|
location ~ (\.htaccess|\.inc)$ {
|
|
deny all;
|
|
}
|
|
|
|
location ~ ^/(inc|plugins|db|cache)/ {
|
|
deny all;
|
|
}
|
|
|
|
## Inter PHP en path_info
|
|
location ~ ^/(index).php(/.*)+ {
|
|
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
|
fastcgi_pass unix:/var/run/php/php{{ php_version }}-fpm.sock;
|
|
include fastcgi_params;
|
|
}
|
|
|
|
## Inter PHP brute
|
|
location ~ \.php$ {
|
|
try_files $uri $uri/ =404;
|
|
fastcgi_pass unix:/var/run/php/php{{ php_version }}-fpm.sock;
|
|
include fastcgi_params;
|
|
}
|
|
|
|
## redirection des zolies URLs vers index.php
|
|
location / {
|
|
try_files $uri $uri/ /index.php$uri?$args;
|
|
}
|
|
}
|
|
|