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

157
Views
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
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!