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

rfountain's avatar

Hosting 2 separate laravel instances on 1 server

Here's what I'm trying to do and wondering if it's possible. I have my main website which is written in Laravel 5.4. I also have a 3rd parting billing application I'm using that's written in laravel 5.2 that I would like to have residing in a subdirectory. So for example

https://mysite.com is my main laravel 5.4 instance and https://portal.mysite.com is my 3rd party Laravel 5.2 application.

is this possible to do. I'm using Forge and Digital Ocean

0 likes
2 replies
rfountain's avatar

I actually think I may have figured this out.

  1. Create new forge site portal.mysite.com
  2. Clone the git repo of my 3rd party tool
  3. Update env variables
  4. Add dns entry in route 53 zone
KNietzsche's avatar

I did it recently check subdirectories as virtualhost in Centos 7 Answer is inside ! Basically at your domain, create 2 CNAME A portal.mysite.com and portal2.mysite.com and change your .conf file at your VPS side like I did in the post. Although I play and like CentOS , I'm sure you will understand and translate for Ubuntu or Debian....

Please or to participate in this conversation.