Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

537
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda