Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dane5890's avatar

Installing Two Laravel Apps On Same Server

Hey, another question. I have a vps server that is hosting a laravel app, which works fine. No problems. Now I want to add a subdomain with another laravel app, but it says site can't be reached. I created a virtualhost for the subdomain outside of the /var/www/html folder to avoid conflicts and set the subdomain up in Godaddy. Did I miss a step?

0 likes
9 replies
ejdelmonico's avatar

Did you allow enough time for the DNS to propagate? GoDaddy is notoriously slow and could take a few days. Also, make sure your .env file is updated for APP_URL to refer to the subdomain. There are many tools to check your DNS to make sure it is correct.

Snapey's avatar

Ping your two websites. If they both return the IP address of your VPS then your DNS is fine

What webserver is it, Apache or NGINX ?

Snapey's avatar

So you have created two virtual hosts files and enabled them?

Each virtual host file points to the public folder of the relevant website?

dane5890's avatar

@SNAPEY - I think you might be right when I tried to trace route of the subdomain I get this error

Temporary failure in name resolution Cannot handle "host" cmdline arg

I'll have to go back to the Godaddy records and see.

Snapey's avatar

You only need to run ping from your PC to prove the DNS

dane5890's avatar

@SNAPEY - yes. Both are enabled. I put the subdomain outside of the html folder, I wonder if that is it

Please or to participate in this conversation.