diff --git a/src/variations/unit/etc/unit/config.d/ssl-full.json.template b/src/variations/unit/etc/unit/config.d/ssl-full.json.template index d29391d51..9fcef79c7 100644 --- a/src/variations/unit/etc/unit/config.d/ssl-full.json.template +++ b/src/variations/unit/etc/unit/config.d/ssl-full.json.template @@ -97,6 +97,32 @@ "return": 200 } }, + { + "match": { + "uri": [ + "/.*", + "/.*/", + "/.*/*", + "/*/.*", + "/*/.*/", + "/*/.*/*" + ] + }, + "action": { + "return": 404 + } + }, + { + "match": { + "uri": [ + "/*.php", + "/*/*.php" + ] + }, + "action": { + "pass": "applications/php/direct" + } + }, { "match": { "uri": "!/index.php" @@ -104,7 +130,7 @@ "action": { "share": "${UNIT_WEBROOT}$uri", "fallback": { - "pass": "applications/php" + "pass": "applications/php/index" } } } @@ -118,12 +144,19 @@ "applications": { "php": { "type": "php", - "root": "${UNIT_WEBROOT}/", - "script": "index.php", "processes": { "max": ${UNIT_PROCESSES_MAX}, "spare": ${UNIT_PROCESSES_SPARE}, "idle_timeout": ${UNIT_PROCESSES_IDLE_TIMEOUT} + }, + "targets": { + "direct": { + "root": "${UNIT_WEBROOT}/" + }, + "index": { + "root": "${UNIT_WEBROOT}/", + "script": "index.php" + } } } }, @@ -131,4 +164,4 @@ "if": "`${uri == '/healthcheck' ? false : true}`", "path": "/dev/stdout" } -} \ No newline at end of file +} diff --git a/src/variations/unit/etc/unit/config.d/ssl-mixed.json.template b/src/variations/unit/etc/unit/config.d/ssl-mixed.json.template index 2e39b833c..334db970c 100644 --- a/src/variations/unit/etc/unit/config.d/ssl-mixed.json.template +++ b/src/variations/unit/etc/unit/config.d/ssl-mixed.json.template @@ -78,6 +78,32 @@ "return": 200 } }, + { + "match": { + "uri": [ + "/.*", + "/.*/", + "/.*/*", + "/*/.*", + "/*/.*/", + "/*/.*/*" + ] + }, + "action": { + "return": 404 + } + }, + { + "match": { + "uri": [ + "/*.php", + "/*/*.php" + ] + }, + "action": { + "pass": "applications/php/direct" + } + }, { "match": { "uri": "!/index.php" @@ -85,7 +111,7 @@ "action": { "share": "${UNIT_WEBROOT}$uri", "fallback": { - "pass": "applications/php" + "pass": "applications/php/index" } } } @@ -98,12 +124,19 @@ "applications": { "php": { "type": "php", - "root": "${UNIT_WEBROOT}/", - "script": "index.php", "processes": { "max": ${UNIT_PROCESSES_MAX}, "spare": ${UNIT_PROCESSES_SPARE}, "idle_timeout": ${UNIT_PROCESSES_IDLE_TIMEOUT} + }, + "targets": { + "direct": { + "root": "${UNIT_WEBROOT}/" + }, + "index": { + "root": "${UNIT_WEBROOT}/", + "script": "index.php" + } } } }, @@ -111,4 +144,4 @@ "if": "`${uri == '/healthcheck' ? false : true}`", "path": "/dev/stdout" } -} \ No newline at end of file +} diff --git a/src/variations/unit/etc/unit/config.d/ssl-off.json.template b/src/variations/unit/etc/unit/config.d/ssl-off.json.template index 02d75316c..2992891bc 100644 --- a/src/variations/unit/etc/unit/config.d/ssl-off.json.template +++ b/src/variations/unit/etc/unit/config.d/ssl-off.json.template @@ -41,6 +41,32 @@ "return": 200 } }, + { + "match": { + "uri": [ + "/.*", + "/.*/", + "/.*/*", + "/*/.*", + "/*/.*/", + "/*/.*/*" + ] + }, + "action": { + "return": 404 + } + }, + { + "match": { + "uri": [ + "/*.php", + "/*/*.php" + ] + }, + "action": { + "pass": "applications/php/direct" + } + }, { "match": { "uri": "!/index.php" @@ -48,7 +74,7 @@ "action": { "share": "${UNIT_WEBROOT}$uri", "fallback": { - "pass": "applications/php" + "pass": "applications/php/index" } } } @@ -61,12 +87,19 @@ "applications": { "php": { "type": "php", - "root": "${UNIT_WEBROOT}/", - "script": "index.php", "processes": { "max": ${UNIT_PROCESSES_MAX}, "spare": ${UNIT_PROCESSES_SPARE}, "idle_timeout": ${UNIT_PROCESSES_IDLE_TIMEOUT} + }, + "targets": { + "direct": { + "root": "${UNIT_WEBROOT}/" + }, + "index": { + "root": "${UNIT_WEBROOT}/", + "script": "index.php" + } } } }, @@ -74,4 +107,4 @@ "if": "`${uri == '/healthcheck' ? false : true}`", "path": "/dev/stdout" } -} \ No newline at end of file +}