diff --git a/conf/nginx.conf b/conf/nginx.conf index 7018e09..57e76b5 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,18 +1,16 @@ location YNH_WWW_PATH { - alias YNH_WWW_ALIAS; - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - 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; + 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; + } + + # Include SSOWAT user panel. + # include conf.d/yunohost_panel.conf.inc; } diff --git a/scripts/install b/scripts/install index a0d6862..904e54c 100755 --- a/scripts/install +++ b/scripts/install @@ -65,10 +65,8 @@ sudo service nginx reload sudo yunohost app ssowatconf # Setting first user details and filling database calling 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=`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 ]