From 298f94bb4f95a1615c290d15dd20b0a15d8468c5 Mon Sep 17 00:00:00 2001 From: magikcypress Date: Tue, 28 Apr 2015 19:58:18 +0200 Subject: [PATCH] Modification de la conf de nginx --- conf/nginx.conf | 8 +++++++- scripts/install | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 9725542..c18c51e 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -9,6 +9,12 @@ location PATHTOCHANGE { rewrite ^(.+)$ PATHTOCHANGE/spip.php?page=$1 last; } client_max_body_size 30m; + location ~^/(tmp|config)/{ + return 403; + } + location / { + try_files $uri $uri/ /spip.php?q=$uri&$args; + } location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_pass unix:/var/run/php5-fpm-spip.sock; @@ -21,4 +27,4 @@ location PATHTOCHANGE { # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; -} +} \ No newline at end of file diff --git a/scripts/install b/scripts/install index f3789ed..72753f6 100644 --- a/scripts/install +++ b/scripts/install @@ -43,7 +43,7 @@ sudo chown -R www-data: $final_path # Modify Nginx configuration file and copy it to Nginx conf directory sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf -sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf +sed -i "s@ALIASTOCHANGE@$final_path@g" ../conf/nginx.conf sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/spip.conf sed -i "s@NAMETOCHANGE@spip@g" ../conf/php-fpm.conf