Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

544
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda