Is there any way to serve another laravel project from totally separate laravel project on the basis of domain?

56 Views Asked by At

Our situation is, We have two laravel projects on the same server suppose (project A & project B) and we have one domain like domain.com And a subdomain like *.domain.com.

Project A is pointed to domain.com project B is pointed to *.domain.com

Now, we want to serve the same project B on the custom domain like customdomain.com. We have added a CNAME record in the DNS manager of customdomain.com. LIKE:

TYPE : CNAME NAME : WWW VALUE : *.domain.com

Now, the issue is instead of serving project B it is serving project A even though we have pointed to the same domain which is serving project B for domain domain.com. We want to serve project B instead of project A.

Point to be noted :

  1. We have two different laravel projects.
  2. Cpanel domain settings are : domain.com pointed to /project A *.domain.com pointed to /project B

Can anyone have any solution? What should be our plan of action?

1

There are 1 best solutions below

1
RH. On

Have you updated cPanel domain settings? customdomain.com must be pointed to /projectB.