Have a look at this guide.
http://novate.co.uk/deploy-laravel-5-on-shared-hosting-from-heart-internet/
Make sure you pointed to your top folder correctly. The guide has an example.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi guys,
I definitivly have problem with my online website.
I'm obtaining 403 forbidden when I'm attempting to create project.
I have my app strucure like below
- /
- goshr-core ( app folders and files except `public/` )
-public_html/
- goshr ( public content inside this folder)
I even don't know why.
Can you help me please?
Thank you in advance and S.U.+
Have a look at this guide.
http://novate.co.uk/deploy-laravel-5-on-shared-hosting-from-heart-internet/
Make sure you pointed to your top folder correctly. The guide has an example.
I vaguely recall you asked this before
\root-laravel-folder
├── app
└── public <- DocumentRoot MUST point here, i.e. https://yourdomain.com
└── robots.txt <- MUST be able to load https://yourdomain.com/robots.txt
├── vendor
...
└── storage
@browniecoffee don't understand your structure
public_html
@laracoft I attempted to share shared hosting structure with implementation of laravel project
This is safe.
laravel_root_files?Take note of robots.txt and align your folders accordingly. DO NOT MOVE any laravel file or folder around.
\ (shared hosting root)
- \root-laravel-folder
├── app
├── public <- DocumentRoot MUST point here, i.e. https://yourdomain.com
│ └── robots.txt <- MUST be able to load https://yourdomain.com/robots.txt
├── vendor
...
└── storage
- laravel_root_files
- shared_hosting_folders/
- public_html/
@laracoft like I'm using free shared hosting for exam, I'm worried about project security.
laravel-root-files are the files in laravel project root like composer.json, composer.lock etc...
What is robot.txt?
composer create-project --prefer-dist laravel/laravel blog, it creates a blog folder, agree?blog as your Laravel root foldercomposer.json, composer.lock is inside blog, agree?blog/public/robots.txt, agree?Please indicate which point you don't agree.
@laracoft I'm agree for all points. I didn't notice there was robos.txt.
@browniecoffee great. Then you project is safe and will run properly, just make sure you point DocumentRoot to public and not blog
Even if I'm using free shared hosting ? @laracoft
@browniecoffee yes, why not? which free shared hosting?
@laracoft I'm using planet hoster world lite
@browniecoffee yes it will work provided you follow all instructions and especially do not move any Laravel file or folder.
On the other hand, I don't know what security you are concerned with. It is free, so planet hoster can do whatever they like and they can see all your files. But others won't be able to access your files.
@laracoft reupload my project but I still have 403 forbidden when I attempt to create project
@browniecoffee Can explain what you mean by "create project"? Where is your DocumentRoot pointing?
My members can create projects. When I'm trying to create one I'm optaining 403. @laracoft
The DocumentRoot ?
What is your domain? Can you load http://domain.com/robots.txt?
@laracoft I can load this file
create public/test.php
<?php
phpinfo();
Can you load http://domain.com/test.php ? What does it show?
I have specified the file location quite clearly. If you still don't understand, why did you agree to my 4 points earlier?
@laracoft It shows basic phpinfo php.7.4
Since you are on the internet shared hosting, give me the working link.
@laracoft I don't think it's secure to give that in a forum. What do you need ? I can try to give you the answer
All I will add is the guide I shared with you is from @snapey site, and I have never had any problems following that guide for shared host.
Are you trying to install or are you uploading your project via FTP. But if you are having that much trouble why not set this project up on digitalocean or similar.
Thanks @jlrdw
@jlrdw I'm using FTP. I don't have SSH access with free shared hosting.
I don't think it's secure to give that in a forum. What do you need ? I can try to give you the answer
Are you kidding right @browniecoffee ? You shared your link in this other thread: https://laracasts.com/discuss/channels/laravel/font-awesome-and-images-not-displaying-in-my-online-project?page=1#reply=656055
Also, you’ve never replied to the help we were trying to give you in your other 2 posts. Like @jlrdw answer with deploy guide or my suggestions on how to move your installation to the root of your domain in a shared hosting
So I’m starting to believe you don’t really want / need help.
@jlrdw I'll consider it
@marianomoreyra I have reupload my project in root instead of subfolder. So I applied your solutions. At any moment I give phpinfo informations. I don't know you talking about.
To finish, I think I have choice to answer you when I can.
'you also new replied to the help'. => Can you give me one moment ? I have many problems in progress so I think you can be patient or no reply to my issues if your not in ability to wait more than 5 to have answer ...
If that's a free host plan you probably will have to keep everything underneath public_html.
For a project that's not real world it would work but I wouldn't recommend it for a real world project that needs to be secure.
Please or to participate in this conversation.