Correction : nginx : location : l'ordre importe grave !
authorJulien Moutinho <julm+heureux-cyclage@autogeree.net>
Thu, 12 Dec 2013 11:38:40 +0000 (12:38 +0100)
committerroot <root@ateliers.heureux-cyclage.org>
Thu, 12 Dec 2013 11:38:48 +0000 (12:38 +0100)
etc/nginx/site.d/cyclocamp-www/local.conf
etc/nginx/site.d/cyclocamp-www/site.conf

index 56b9f1c..39480f3 100644 (file)
@@ -1 +1,4 @@
 listen 80;
+location ~ ^/julm/ {
+       return 301 https://$server_name$request_uri;
+ }
index 2e7e630..77a253a 100644 (file)
@@ -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