Can't answer, but I'm trying to accomplish the same thing, so I'll keep an eye open here too xD
This is pretty easy. Here is how you create multiple websites/domains on one server: Every website/domain need a different Repository. For Example I have two repositories:
Then I created two subdomains and redirect this to my Digital Ocean server IP-address:
demo1.mydomain.com -> 80.40.xx.xx.xxx demo2.mydomain.com -> 80.40.xx.xx.xxx
In Laravel Forge you created the two domains with both the directory (/Public). Then you connect your Repository to each domain and deploy your Laravel Project.
Simple 2 steps to fix it:
1- Create relations between your Website Domain created at Forge and the IP of your Digital Ocean Instance. (It's DNS management) 2- Never try to access your website by IP/folder, but by Domain.
If your domains are fake domains like "myproject.dev" then create internal DNS for it: Edit your hosts file by adding the pair value of IP address of your instance and Domain name. i.e. 127.0.0.1 localhost 10.20.30.40 myproject.dev
 You found this file on *nix "/etc/hosts" or windows "%windir%\system32\drivers\etc\hosts" (you need to be root or administrator do edit this file)
Anyone found an answer to this question??
I had this same problem. I couldn't find a way to do it strictly by ip address, but one way you can access the different sites is to edit your local hosts file.
Basically, get rid of the default site, and then add sites like this in forge:
Root Domain: dev.mysite1.com
Web Directory: public
Root Domain: dev.mysite2.com
Web Directory: public
Add as many as you want with different domain names and link them up to repositories.
Then update the hosts file on your computer. You would add the ip address and then use the domain names you had added to forge:
Then you can access the individual sites by those domains.
Here's a link that explains how to update your hosts file:
Has anyone found a way to do this without editing the hosts file?
Sign in to participate in this thread!
We'd like to thank these amazing companies for supporting us
The Laravel portal for problem solving, knowledge sharing and community building.