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

148
Visualizações
Deploying Laravel App on Shared hosting securely

It seems there are a lot of different approaches to deploying a laravel application on shared hosting based on some googling. I understand it's different per hosting provider, but I'm looking for a simple and secure way to do this.

Right now I have a symlink from /home/username/laravel-src/public to /home/username/public_html. This gets my application on my domain, although under the public route (ie. www.domain-name.com/public). I can fix this easily by updating my .htaccess file in my public_html director to the following:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

I've seen this suggested in other posts, but people are saying this is not a secure approach and I'm wondering why? Isn't this just redirecting requests from / to /public internally? None of the src or env files are exposed...are they??

And if there are security concerns around this, is there at all a secure way to deploy a laravel app to shared hosting?

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