From 467392b00c5dffa373361c45a80d9916a26e0a05 Mon Sep 17 00:00:00 2001 From: frju365 Date: Sat, 28 Jan 2017 23:20:16 +0100 Subject: [PATCH] Update nginx.conf --- conf/nginx.conf | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 6d4000e..dafb333 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,21 +1,23 @@ location YNH_WWW_PATH { - alias YNH_WWW_ALIAS ; + alias YNH_WWW_ALIAS/www/ ; if ($scheme = http) { rewrite ^ https://$server_name$request_uri? permanent; } - index index.php; - try_files $uri $uri/ index.php; + # Default indexes and catch-all + index index.html index.php; + try_files $uri $uri/ /index.php?$args; location ~ ^/(.+/|)\.(?!well-known\/) { deny all; - 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;