server {
{% include './templates/header.conf.j2' %}
	root /srv/http/mail.libertus.eu/;
	index index.html index.htm index.php;

	client_max_body_size 512M;
	
	location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
		expires 2w;
		log_not_found off;
	}
	
	## Dossiers et fichiers interdits d'accès
	location ~ (README|INSTALL|LICENSE|SQL|bin|CHANGELOG|\.htaccess|\.inc)$ {
		deny all;
	}
	location ~ ^/(config|logs|temp) {
		deny all;
	}
	location ~ ^/program/js {
		#autorise le dossier program/js
	}
	location ~ ^/program/.*\.gif$ {
		#autorise les gifs du dossier program
	}
	location ~ ^/program {
		deny all;
	}
	
	location = /favicon.ico {
		rewrite ^(.*)$ skins/default/images/favicon.ico;
	}
	
	location ~ \.php$ {
		try_files $uri $uri/ =404;
		fastcgi_pass unix:/var/run/php/php{{ php_version }}-fpm.sock;
		include fastcgi_params;
	}
}

