0

I am using laravel on shared hosting.

Under my domain in my folder is the laravel app.

Now I see online that many people do weird stuff with the laravel public folder, they either move it to a different location or create a sys link, but why?

Isn't the laravel setup secure? As far as I understand nothing below the public folder can be accessed.

I simply put my laravel app into the domain folder and linked the domain to laravel/public.

I even asked my provider and they confirmed it that this is the way to go.

But I am really paranoid about security, why many other people do it differently, maybe they have different setups?

1 Answer 1

1

The only reason that some people changed/directed this folder to something else is because of older versions of the app cause problems some users say.

So that said, relax and don't be paranoid. Using the /public_html or just /public has the same security as if someone changes or redirect to another.

If you still want to make the change to be 'just sure'.

laravel by itself is already good in its security, BUT you can always take extra security measurements to make it extra secure.

What you can add by yourself as security extras:

  • SSL certificate installation
  • the app installed on a cloud-based platform for data losing security - (if out of nothing the security may go unwanted down or whatever)

And that's it actually, laravel with its version 7.x is so far the best build that is published from all other versions and is furthermore really secure.

Additional to add laravel's dev its Git of the latest published version. Click here If there are security changes (and the system update fails in laravel) you can find and git them from there.

2
  • Thanks a lot for this, very helpful for me!
    – Roman
    Jul 11, 2020 at 7:44
  • schroeder thank you for the edit! excuse for the so now and there bad spelling. @Roman you're welcome!
    – Rcontent
    Jul 11, 2020 at 19:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.