Bob Mottram 7 anni fa
parent
commit
7d70a117fa
2 ha cambiato i file con 14 aggiunte e 4 eliminazioni
  1. 2
    2
      src/freedombone-app-bludit
  2. 12
    2
      src/freedombone-template

+ 2
- 2
src/freedombone-app-bludit Vedi File

@@ -314,7 +314,7 @@ function install_bludit {
314 314
           echo '  # Location';
315 315
           echo '  location / {'; } >> "$bludit_nginx_site"
316 316
         nginx_limits "$BLUDIT_DOMAIN_NAME" '15m'
317
-        { echo "    try_files \$uri \$uri/ /index.html;";
317
+        { echo "    try_files \$uri \$uri/ /index.php?\$args;";
318 318
           echo '  }';
319 319
           echo '}'; } >> "$bludit_nginx_site"
320 320
     else
@@ -345,7 +345,7 @@ function install_bludit {
345 345
       echo '  # Location';
346 346
       echo '  location / {'; } >> "$bludit_nginx_site"
347 347
     nginx_limits "$BLUDIT_DOMAIN_NAME" '15m'
348
-    { echo "    try_files \$uri \$uri/ index.html;";
348
+    { echo "    try_files \$uri \$uri/ index.php?\$args;";
349 349
       echo '  }';
350 350
       echo '}'; } >> "$bludit_nginx_site"
351 351
 

+ 12
- 2
src/freedombone-template Vedi File

@@ -686,6 +686,7 @@ if [ ! $app_onion_only ]; then
686 686
         echo "          echo '    include snippets/fastcgi-php.conf;';"
687 687
         echo "          echo '    fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;';"
688 688
         echo "          echo '    fastcgi_read_timeout 30;';"
689
+        echo "          echo '    fastcgi_param HTTPS on;';"
689 690
         echo "          echo '  }';"
690 691
         echo "          echo '';"
691 692
     else
@@ -695,7 +696,11 @@ if [ ! $app_onion_only ]; then
695 696
     echo "          echo '  location / {'; } >> \"\$${app_name}_nginx_site\""
696 697
     echo "        nginx_limits \"\$${app_name_upper}_DOMAIN_NAME\" '15m'"
697 698
     if [ ! $app_daemon ]; then
698
-        echo "        { echo \"    try_files \\\$uri \\\$uri/ /index.html;\";"
699
+        if [[ "$app_php" != 'yes' ]]; then
700
+            echo "        { echo \"    try_files \\\$uri \\\$uri/ /index.html;\";"
701
+        else
702
+            echo "        { echo \"    try_files \\\$uri \\\$uri/ /index.php?\\\$args;\";"
703
+        fi
699 704
     else
700 705
         echo "        { echo \"    proxy_pass http://localhost:\$${app_name_upper}_PORT_INTERNAL;\";"
701 706
     fi
@@ -728,6 +733,7 @@ if [[ "$app_php" == 'yes' ]]; then
728 733
     echo "      echo '    include snippets/fastcgi-php.conf;';"
729 734
     echo "      echo '    fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;';"
730 735
     echo "      echo '    fastcgi_read_timeout 30;';"
736
+    echo "      echo '    fastcgi_param HTTPS off;';"
731 737
     echo "      echo '  }';"
732 738
     echo "      echo '';"
733 739
 else
@@ -737,7 +743,11 @@ echo "      echo '  # Location';"
737 743
 echo "      echo '  location / {'; } >> \"\$${app_name}_nginx_site\""
738 744
 echo "    nginx_limits \"\$${app_name_upper}_DOMAIN_NAME\" '15m'"
739 745
 if [ ! $app_daemon ]; then
740
-    echo "    { echo \"    try_files \\\$uri \\\$uri/ index.html;\";"
746
+    if [[ "$app_php" != 'yes' ]]; then
747
+        echo "    { echo \"    try_files \\\$uri \\\$uri/ index.html;\";"
748
+    else
749
+        echo "    { echo \"    try_files \\\$uri \\\$uri/ index.php?\\\$args;\";"
750
+    fi
741 751
 else
742 752
     echo "      echo \"    proxy_pass http://localhost:\$${app_name_upper}_PORT_INTERNAL;\";"
743 753
 fi