From 29e2cd9786e332a216f675b905268d4c1c1d65ae Mon Sep 17 00:00:00 2001 From: frju365 Date: Sat, 28 Jan 2017 23:36:09 +0100 Subject: [PATCH] Update nginx.conf --- conf/nginx.conf | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 5620398..82606d7 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,24 +1,20 @@ + location YNH_WWW_PATH { alias YNH_WWW_ALIASwww/ ; if ($scheme = http) { rewrite ^ https://$server_name$request_uri? permanent; } - # Default indexes and catch-all - index index.html index.php; - try_files $uri $uri/ /index.php?$args; - location ~ ^/(.+/|)\.(?!well-known\/) { - deny all; + index index.php; + try_files $uri $uri/ index.php; + location ~ [^/]\.php(/|$) { + fastcgi_split_path_info ^(.+?\.php)(/.*)$; + fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param REMOTE_USER $remote_user; + fastcgi_param PATH_INFO $fastcgi_path_info; + fastcgi_param SCRIPT_FILENAME $request_filename; } - # Execute and serve PHP files - location ~ [^/]\.php(/|$) { - fastcgi_split_path_info ^(.+?\.php)(/.*)$; - fastcgi_pass unix:/var/run/php5-fpm-my_webapp.sock; - fastcgi_index index.php; - include fastcgi_params; - fastcgi_param REMOTE_USER $remote_user; - fastcgi_param PATH_INFO $fastcgi_path_info; - fastcgi_param SCRIPT_FILENAME $request_filename; - } # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc;