Use port 43112 and wildcard IPv4 in PHP mode
This commit is contained in:
1 parent
c6928d66b2
commit
230743be33
5 files changed
+13
-14
No files matched your search
@@ -11,14 +11,13 @@ http {
|
||||
access_log off;
|
||||
server_tokens off;
|
||||
server {
|
||||
listen 127.0.0.1:@PORT@;
|
||||
if ($http_host !~* "^(127\.0\.0\.1|localhost)(:[0-9]{1,5})?$") {
|
||||
return 400;
|
||||
}
|
||||
location = /webconsole {
|
||||
return 302 /webconsole/;
|
||||
}
|
||||
location ^~ /webconsole/ {
|
||||
listen 0.0.0.0:@PORT@;
|
||||
location ~ ^/webconsole(?:/|$) {
|
||||
allow 127.0.0.0/8;
|
||||
deny all;
|
||||
if ($http_host !~* "^(127\.0\.0\.1|localhost)(:[0-9]{1,5})?$") {
|
||||
return 403;
|
||||
}
|
||||
root @STAGE@;
|
||||
index index.html;
|
||||
types {
|
||||
|
||||
+2
-2
@@ -9,8 +9,8 @@ function failRequest($status, $message)
|
||||
|
||||
header('Cache-Control: no-store');
|
||||
$host = $_SERVER['HTTP_HOST'] ?? '';
|
||||
if (!preg_match('/\A(?:127\.0\.0\.1|localhost)(?::[0-9]{1,5})?\z/i', $host)) {
|
||||
failRequest(400, 'Use a loopback host');
|
||||
if (!preg_match('/\A[a-z0-9](?:[a-z0-9.-]{0,251}[a-z0-9])?(?::[0-9]{1,5})?\z/i', $host)) {
|
||||
failRequest(400, 'Invalid HTTP host');
|
||||
return;
|
||||
}
|
||||
if (($_SERVER['REQUEST_METHOD'] ?? '') !== 'GET') {
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ export PATH="$PATH:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/loca
|
||||
nginx="${EZSERVER_NGINX:-nginx}"
|
||||
php="${EZSERVER_PHP:-php}"
|
||||
fpm="${EZSERVER_PHP_FPM:-php-fpm}"
|
||||
port="${EZSERVER_PORT:-55005}"
|
||||
port="${EZSERVER_PORT:-43112}"
|
||||
|
||||
if [[ ! -f "$runtime/www/ezwebserver/src/public/api/index.php" ]]; then
|
||||
printf '%s\n' 'Original PHP runtime missing. Check server/original or set EZSERVER_RUNTIME.' >&2
|
||||
|
||||
Reference in new issue
Block a user