Closed ghena closed 2 years ago
You also need to pass through a username
when the site is isolated. We're going to deploy a fix for this validation here.
Can you email forge@laravel.com and include the server and site ID, please?
I sent already a ticket to forge. the username must be related to the directory or not ?
You can set the username to whatever anything except:
I've not been able to recreate the issue experienced. Issuing the command from the SDK is resulting in the site being created, and data returned properly.
$forge = new \Laravel\Forge\Forge(env('FORGE_API_KEY'));
$site = $forge->createSite($serverId, [
"domain" => "testsite.com",
"project_type" => "php",
"directory" => "/public",
"isolated" => true,
"php_version" => "php73"
]);
dump($site);
returns
Laravel\Forge\Resources\Site {#648
+id: 1493280
+serverId: [redacted]
+name: "testsite.com"
+aliases: []
+directory: "/public"
+status: "installed"
+projectType: "php"
+username: "forge"
[...]
}
It seems that if username
is left off the request, that a default of forge
is used to create the site anyway.
yes but the website goes on error or not ?
however , using username seems to work.
@ghena I did not get an error when username
was left empty.
@ghena I did not get an error when
username
was left empty.
have you tried using a subdomain ?
have you tried using a subdomain ?
I hadn't, but just tried it - worked without error again.
$forge = new \Laravel\Forge\Forge(env('FORGE_API_KEY'));
$site = $forge->createSite($serverId, [
"domain" => "demo2.testsite.com",
"project_type" => "php",
"directory" => "/public",
"isolated" => true,
"php_version" => "php73"
]);
dump($site);
gives
Laravel\Forge\Resources\Site {#648
+id: 1493981
+serverId: [redacted]
+name: "demo2.testsite.com"
+aliases: []
+directory: "/public"
+status: "installed"
+projectType: "php"
+username: "forge"
It's possible that the Forge team deployed a fix already, but as long as you can get it working, that's the main thing!
same issue even on isolated false Nginx is ok but php says: [14-Jul-2023 16:14:58] NOTICE: Terminating ... [14-Jul-2023 16:14:58] NOTICE: exiting, bye-bye! [14-Jul-2023 16:14:58] NOTICE: fpm is running, pid 9140 [14-Jul-2023 16:14:58] NOTICE: ready to handle connections [14-Jul-2023 16:14:58] NOTICE: systemd monitor interval set to 10000ms
Description:
Using CreateSite method and isolation = true website goes on 502 error.
Steps To Reproduce:
Create Site
$siteParams = [ "domain" => $siteSlug .".socialdrinks.it", "project_type" => "php", "directory" => "/public", "isolated" => true, "php_version" => "php74" ];
$forge = new Laravel\Forge\Forge($token,$guzzleClient); $forge->createSite($serverId, $siteParams,false);
Site is created but the website response is 502 bad gateway.
regards. .g