Correction : nginx : if is evil.
[lhc/ateliers.git] / etc / nginx / site.d / cyclo-letabli / site.conf
index be97db0..a06f71b 100644 (file)
@@ -3,8 +3,14 @@ server_name
  letabli.org;
 root /home/www/data/cyclo-letabli/www;
 
+rewrite /wp-admin$ $scheme://$host$uri/ permanent;
+       # Add trailing slash to */wp-admin requests.
+location = /wp-admin/ {
+       return 301 /wp-admin/index.php?$args;
+ }
 location / {
        index index.html index.htm index.php;
+       try_files $uri $uri/ /index.php?$args;
  }
 location ~* ^.+\.(css|gif|html|ico|jpeg|js|jpg|png|txt|xml)$ {
        access_log off;
@@ -44,8 +50,11 @@ location ~ \.php(|/.+)$ {
        fastcgi_pass_header Cookie;
        fastcgi_pass_header Set-Cookie;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
+       try_files $fastcgi_script_name =404;
+               # Check for path info security issue
+
        
-       fastcgi_pass unix:/run/php5/fpm/cyclo_letabli;
+       fastcgi_pass unix:/run/php5/fpm/letabli;
  }
 
 # vim: ft=sh