Multi Domain And Laravel Error Databases Connection #1353
Unanswered
ronnytiaka
asked this question in
Q&A
Replies: 3 comments 7 replies
-
Could it be that you have |
Beta Was this translation helpful? Give feedback.
0 replies
-
May check my .env maybe somewrong that i missed Site1 .env
Site2 .env
|
Beta Was this translation helpful? Give feedback.
6 replies
-
sorry i was tried to with Caddyfile like this :
i try put code in blade site2 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The problem I’m having:
I use multi domain with same server, with same IP and one Caddy. example i call the domain is https://site1/ and https://site2/. in my site i use laravel, its success open two site that, but the problem is in database connection, when on first open is site1 then success connected to site1database, but when i open site2, database still connected to site1database. in other case, i restart the caddy, i first open site2, database connected to site2, but when i open site1 database still in databasesite2. soo, look like caddy get wrong get information the .env or laravel config.
Error messages and/or full log output:
This error when i 1st open site1 then site2
Site1 Database : site1db with table tablesite1
Site2 Database : site2db with table tablesite2
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'site1db.tableinsite2' doesn't exist
System environment:
Ubuntu Server 22.04
Command:
frankenphp run --config /etc/caddy/Caddyfile
My complete Caddy config:
Beta Was this translation helpful? Give feedback.
All reactions