Skip to content

Commit 9cfbdf4

Browse files
authored
[2.x] Fixes NGINX proxy usages (#772)
* Fixes `NGINX` proxy usages * And removes extra message
1 parent 2f1f7d2 commit 9cfbdf4

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/Commands/Concerns/InteractsWithIO.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ trait InteractsWithIO
3636
'[INFO] RoadRunner server started; version:',
3737
'[INFO] sdnotify: not notified',
3838
'exiting; byeee!!',
39+
'storage cleaning happened too recently',
3940
];
4041

4142
/**

src/Commands/StartFrankenPhpCommand.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ public function handle(ServerProcessInspector $inspector, ServerStateFile $serve
7171
$this->forgetEnvironmentVariables();
7272

7373
$host = $this->option('host');
74+
$port = $this->getPort();
75+
76+
$serverName = $this->option('https')
77+
? "https://$host:$port"
78+
: "http://:$port";
7479

7580
$process = tap(new Process([
7681
$frankenphpBinary,
@@ -84,7 +89,7 @@ public function handle(ServerProcessInspector $inspector, ServerStateFile $serve
8489
'MAX_REQUESTS' => $this->option('max-requests'),
8590
'CADDY_SERVER_LOG_LEVEL' => $this->option('log-level') ?: (app()->environment('local') ? 'INFO' : 'WARN'),
8691
'CADDY_SERVER_LOGGER' => 'json',
87-
'CADDY_SERVER_SERVER_NAME' => ($this->option('https') ? 'https://' : 'http://')."$host:".$this->getPort(),
92+
'CADDY_SERVER_SERVER_NAME' => $serverName,
8893
'CADDY_SERVER_WORKER_COUNT' => $this->workerCount() ?: '',
8994
'CADDY_SERVER_EXTRA_DIRECTIVES' => $this->buildMercureConfig(),
9095
]));

0 commit comments

Comments
 (0)