ソースを参照

On active SSL dans la configuration pour pouvoir accéder au site public

magikcypress 8 年 前
コミット
5468deb81d
4 ファイル変更9 行追加2 行削除
  1. 1 1
      conf/nginx.conf
  2. 0 1
      scripts/_common
  3. 6 0
      scripts/install
  4. 2 0
      scripts/upgrade

+ 1 - 1
conf/nginx.conf

@@ -27,7 +27,7 @@ location __PATHTOCHANGE__ {
 	add_header X-Download-Options noopen;
 	add_header X-Permitted-Cross-Domain-Policies none;
 
-	try_files $uri $uri/  /__PATHTOCHANGE__/index.php?q=$uri&$args;
+	try_files $uri $uri/  __PATHTOCHANGE__/index.php?q=$uri&$args;
 
 	# Old image system ?
 	rewrite ^/([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$1$2$3.jpg last;

+ 0 - 1
scripts/_common

@@ -1 +0,0 @@
-PRESTASHOP_SOURCE_URL="https://download.prestashop.com/download/releases/prestashop_1.7.0.5.zip"

+ 6 - 0
scripts/install

@@ -124,6 +124,12 @@ sudo rm -fr $final_path/install
 #=================================================
 sudo chown -R www-data: $final_path
 
+#=================================================
+# active ssl
+#=================================================
+mysql -u $db_user -p$db_pwd $db_user -e "UPDATE _ps_configuration SET value=1 WHERE name='PS_SSL_ENABLED';"
+mysql -u $db_user -p$db_pwd $db_user -e "INSERT INTO _ps_configuration (id_configuration, id_shop_group, id_shop, name, value, date_add, date_upd) VALUES (NULL, NULL, NULL, 'PS_SSL_ENABLED_EVERYWHERE', '1', NOW(), NOW());"
+
 #=================================================
 # Set /etc/hosts
 #=================================================

+ 2 - 0
scripts/upgrade

@@ -28,6 +28,8 @@ root_pwd=$(sudo cat /etc/yunohost/mysql)
 
 final_path=/var/www/$app
 
+SETUP_SOURCE
+
 db_name=$app
 
 # Modify Nginx configuration file and copy it to Nginx conf directory