diff --git a/public/assets/js/app.js b/public/assets/js/app.js
index 393beac..2722848 100644
--- a/public/assets/js/app.js
+++ b/public/assets/js/app.js
@@ -50,6 +50,7 @@
php: true,
php_server: '/var/run/php/php7.2-fpm.sock',
php_server_backup: '',
+ php_legacy_routing: false,
wordpress: false,
drupal: false,
magento: false,
@@ -531,6 +532,10 @@
return $scope.data.fallback_php && $scope.isPHP();
};
+ $scope.isLegacyPHPRouting = function() {
+ return $scope.isPHP() && $scope.data.php_legacy_routing;
+ };
+
$scope.isPHP = function() {
return $scope.data.php;
};
diff --git a/public/index.html b/public/index.html
index 9882181..449548f 100644
--- a/public/index.html
+++ b/public/index.html
@@ -538,6 +538,17 @@
ng-class="{ 'input-changed': data.fallback_php_path !== defaultData.fallback_php_path }">
+
diff --git a/public/templates/conf/nginxconfig.io/php_fastcgi.conf.html b/public/templates/conf/nginxconfig.io/php_fastcgi.conf.html
index 7ed1b43..3d3789d 100644
--- a/public/templates/conf/nginxconfig.io/php_fastcgi.conf.html
+++ b/public/templates/conf/nginxconfig.io/php_fastcgi.conf.html
@@ -1,17 +1,26 @@
+# split path
+fastcgi_split_path_info ^(.+\.php)(/.+)$;
+set $_fastcgi_path_info $fastcgi_path_info;
+
+# 404
+try_files $fastcgi_script_name =404;
+
# default fastcgi_params
include fastcgi_params;
# fastcgi settings
-fastcgi_pass {{ !isPHPBackup() ? ((data.php_server[0] === '/' ? 'unix:' : '') + data.php_server) : 'php' }};
-fastcgi_index index.php;
-fastcgi_split_path_info ^(.+\.php)(/.+)$;
+fastcgi_pass {{ !isPHPBackup() ? ((data.php_server[0] === '/' ? 'unix:' : '') + data.php_server) : 'php' }};
+fastcgi_index index.php;
+fastcgi_buffers 8 16k;
+fastcgi_buffer_size 32k;
+# fastcgi params
fastcgi_param DOCUMENT_ROOT $realpath_root;
-fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
+fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
+fastcgi_param PATH_INFO $_fastcgi_path_info;
fastcgi_param PHP_ADMIN_VALUE "open_basedir=$base/:/usr/lib/php/:/tmp/";
-
-fastcgi_intercept_errors off;
-fastcgi_buffer_size 128k;
-fastcgi_buffers 256 16k;
-fastcgi_busy_buffers_size 256k;
-fastcgi_temp_file_write_size 256k;
diff --git a/public/templates/conf/nginxconfig.io/wordpress.conf.html b/public/templates/conf/nginxconfig.io/wordpress.conf.html
index 1a14cdb..926ea2f 100644
--- a/public/templates/conf/nginxconfig.io/wordpress.conf.html
+++ b/public/templates/conf/nginxconfig.io/wordpress.conf.html
@@ -1,6 +1,5 @@
# WordPress: allow TinyMCE
location = /wp-includes/js/tinymce/wp-tinymce.php {
- try_files $uri =404;
include nginxconfig.io/php_fastcgi.conf;
}
@@ -32,6 +31,5 @@ location ~* ^/(?:xmlrpc\.php|wp-links-opml\.php|wp-config\.php|wp-config-sample\
# WordPress: throttle wp-login.php
location = /wp-login.php {
limit_req zone=login burst=2 nodelay;
- try_files $uri =404;
include nginxconfig.io/php_fastcgi.conf;
}
diff --git a/public/templates/conf/sites-available/example.com.conf.html b/public/templates/conf/sites-available/example.com.conf.html
index 5152ca9..59365dd 100644
--- a/public/templates/conf/sites-available/example.com.conf.html
+++ b/public/templates/conf/sites-available/example.com.conf.html
@@ -85,14 +85,12 @@ server {
# handle .php
- location ~ \.php$ {
- try_files $uri =404;
include nginxconfig.io/php_fastcgi.conf;
-
}