diff --git a/conf/nginx.conf b/conf/nginx.conf index c95f95a..57e76b5 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,20 +1,16 @@ location YNH_WWW_PATH { + alias YNH_WWW_ALIAS; + index 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; + } - # Path to source - alias YNH_WWW_ALIAS ; - - # Example PHP configuration - 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; - } - - # Include SSOWAT user panel. - include conf.d/yunohost_panel.conf.inc; + # Include SSOWAT user panel. + # include conf.d/yunohost_panel.conf.inc; } diff --git a/scripts/install b/scripts/install index 9c1374a..904e54c 100755 --- a/scripts/install +++ b/scripts/install @@ -65,7 +65,8 @@ sudo service nginx reload sudo yunohost app ssowatconf # Setting first user details and filling database calling admin/install/index.php -success=`curl --cacert /etc/yunohost/certs/$domain/ca.pem -F "u_email=$EMAIL" -F "u_firstname=$FIRSTNAME" -F "u_name=$NAME" -F "u_login=$LOGIN" -F "u_pwd=$admin_password" -F "u_pwd2=$admin_password" -F "u_date=$TZ" https://$domain$path/admin/install/index.php` +success=`curl -L --cacert /etc/yunohost/certs/$domain/ca.pem -F "u_email=$EMAIL" -F "u_firstname=$FIRSTNAME" -F "u_name=$NAME" -F "u_login=$LOGIN" -F "u_pwd=$admin_password" -F "u_pwd2=$admin_password" -F "u_date=$TZ" https://$domain$path/admin/install/index.php` +# success=`curl -L --cacert /etc/yunohost/certs/$domain/ca.pem -H 'Host: $domain' -X POST --data '?u_email=$EMAIL&u_firstname=$FIRSTNAME&u_name=$NAME&u_login=$LOGIN&u_pwd=$admin_password&u_pwd2=$admin_password&u_date=$TZ' https://$domain$path/admin/install/index.php` # Success or not success if [ `echo $success | grep -c success` -gt 0 ]