diff --git a/src/freedombone-app-bludit b/src/freedombone-app-bludit index 7511d261..0c6be8c7 100755 --- a/src/freedombone-app-bludit +++ b/src/freedombone-app-bludit @@ -314,7 +314,7 @@ function install_bludit { echo ' # Location'; echo ' location / {'; } >> "$bludit_nginx_site" nginx_limits "$BLUDIT_DOMAIN_NAME" '15m' - { echo " try_files \$uri \$uri/ /index.html;"; + { echo " try_files \$uri \$uri/ /index.php?\$args;"; echo ' }'; echo '}'; } >> "$bludit_nginx_site" else @@ -345,7 +345,7 @@ function install_bludit { echo ' # Location'; echo ' location / {'; } >> "$bludit_nginx_site" nginx_limits "$BLUDIT_DOMAIN_NAME" '15m' - { echo " try_files \$uri \$uri/ index.html;"; + { echo " try_files \$uri \$uri/ index.php?\$args;"; echo ' }'; echo '}'; } >> "$bludit_nginx_site" diff --git a/src/freedombone-template b/src/freedombone-template index 31258fe5..f490972f 100755 --- a/src/freedombone-template +++ b/src/freedombone-template @@ -686,6 +686,7 @@ if [ ! $app_onion_only ]; then echo " echo ' include snippets/fastcgi-php.conf;';" echo " echo ' fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;';" echo " echo ' fastcgi_read_timeout 30;';" + echo " echo ' fastcgi_param HTTPS on;';" echo " echo ' }';" echo " echo '';" else @@ -695,7 +696,11 @@ if [ ! $app_onion_only ]; then echo " echo ' location / {'; } >> \"\$${app_name}_nginx_site\"" echo " nginx_limits \"\$${app_name_upper}_DOMAIN_NAME\" '15m'" if [ ! $app_daemon ]; then - echo " { echo \" try_files \\\$uri \\\$uri/ /index.html;\";" + if [[ "$app_php" != 'yes' ]]; then + echo " { echo \" try_files \\\$uri \\\$uri/ /index.html;\";" + else + echo " { echo \" try_files \\\$uri \\\$uri/ /index.php?\\\$args;\";" + fi else echo " { echo \" proxy_pass http://localhost:\$${app_name_upper}_PORT_INTERNAL;\";" fi @@ -728,6 +733,7 @@ if [[ "$app_php" == 'yes' ]]; then echo " echo ' include snippets/fastcgi-php.conf;';" echo " echo ' fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;';" echo " echo ' fastcgi_read_timeout 30;';" + echo " echo ' fastcgi_param HTTPS off;';" echo " echo ' }';" echo " echo '';" else @@ -737,7 +743,11 @@ echo " echo ' # Location';" echo " echo ' location / {'; } >> \"\$${app_name}_nginx_site\"" echo " nginx_limits \"\$${app_name_upper}_DOMAIN_NAME\" '15m'" if [ ! $app_daemon ]; then - echo " { echo \" try_files \\\$uri \\\$uri/ index.html;\";" + if [[ "$app_php" != 'yes' ]]; then + echo " { echo \" try_files \\\$uri \\\$uri/ index.html;\";" + else + echo " { echo \" try_files \\\$uri \\\$uri/ index.php?\\\$args;\";" + fi else echo " echo \" proxy_pass http://localhost:\$${app_name_upper}_PORT_INTERNAL;\";" fi