Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

536
Views
How to point multiple laravel projects on same domain?

I want to create two Laravel applications like below:

app1.domain.com -> points to app1 laravel. Here I am allowing multiple subdomains like wildcard subdomains.

app1.domain.com/blog -> should point to blog laravel.

Database is the same for both applications, and session will be the same.

How can point these two like above?

I have pointed like below

<VirtualHost *:80>
    DocumentRoot "C:\wamp64\www\app1\public"
    ServerName      app1.domain.local
    ServerAlias     *.domain.local
    <Directory "C:\wamp64\www\app1\public">
        Options Indexes FollowSymLinks
        allow from all
        order allow,deny
        AllowOverride All
    </Directory>

    ## Path to laravel sub-folder
    Alias /blog/ "C:\wamp64\www\blog\public"
    <Directory "C:\wamp64\www\blog\public">
        AllowOverride All
    </Directory>
</VirtualHost>

Using above config, app1 is working fine but blog application does not work. It shows forbidden error You don't have permission to access /blog/ on this server.

Solution:

<VirtualHost *:80>
    DocumentRoot "C:\wamp64\www\app1\public"
    ServerName      app1.domain.local
    ServerAlias     *.domain.local
    ## Path to laravel sub-folder
    Alias /blog/ "C:\wamp64\www\blog\public"
    <Directory "C:\wamp64\www\blog\public">
        AllowOverride All
    </Directory>

    <Directory "C:\wamp64\www\app1\public">
        Options Indexes FollowSymLinks
        allow from all
        order allow,deny
        AllowOverride All
    </Directory>


</VirtualHost>

Now working fine but with in the blog application assets path not working correctly. assets pointing from main domain instead of subfolder. it should be like http://app1.domain.local/blog/assets/js/login.min.js?id=c818c905d151b67566ee

but loading from http://app1.domain.local/assets/js/login.min.js?id=c818c905d151b67566ee

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!