From: Julien Moutinho Date: Thu, 12 Dec 2013 11:38:40 +0000 (+0100) Subject: Correction : nginx : location : l'ordre importe grave ! X-Git-Url: https://git.cyclocoop.org/?p=lhc%2Fateliers.git;a=commitdiff_plain;h=f727a2549fddf3f835c08a6be2a7ac292811b75a Correction : nginx : location : l'ordre importe grave ! --- 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