From f727a2549fddf3f835c08a6be2a7ac292811b75a Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Thu, 12 Dec 2013 12:38:40 +0100 Subject: [PATCH] Correction : nginx : location : l'ordre importe grave ! --- etc/nginx/site.d/cyclocamp-www/local.conf | 3 +++ etc/nginx/site.d/cyclocamp-www/site.conf | 16 ++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/etc/nginx/site.d/cyclocamp-www/local.conf b/etc/nginx/site.d/cyclocamp-www/local.conf index 56b9f1c..39480f3 100644 --- a/etc/nginx/site.d/cyclocamp-www/local.conf +++ b/etc/nginx/site.d/cyclocamp-www/local.conf @@ -1 +1,4 @@ listen 80; +location ~ ^/julm/ { + return 301 https://$server_name$request_uri; + } diff --git a/etc/nginx/site.d/cyclocamp-www/site.conf b/etc/nginx/site.d/cyclocamp-www/site.conf index 2e7e630..77a253a 100644 --- a/etc/nginx/site.d/cyclocamp-www/site.conf +++ b/etc/nginx/site.d/cyclocamp-www/site.conf @@ -3,19 +3,14 @@ server_name www.cyclocamp.org cyclocamp.org; -location / { - index index.html index.htm index.php; - } -location ~* ^.+\.(css|gif|html|ico|jpeg|js|jpg|png|txt|xml)$ { - access_log off; - expires 30d; - log_not_found off; - } location ~ /\. { access_log off; deny all; log_not_found off; } +location / { + index index.html index.htm index.php; + } location ~ ^/julm/public/ { auth_basic off; } @@ -23,5 +18,10 @@ location ~ ^/julm/ { auth_basic "ni dieu, ni maitre, ni moteur"; auth_basic_user_file /home/www/data/cyclocamp-www/julm/.htpasswd; } +location ~* ^.+\.(css|gif|html|ico|jpeg|js|jpg|png|txt|xml)$ { + access_log off; + expires 30d; + log_not_found off; + } # vim: ft=sh -- 2.20.1