1

I kept searching today for a proper guide on how to deploy my laravel app to a godaddy hosting but no luck so far.. I followed this https://medium.com/@kunalnagar/deploying-laravel-5-on-godaddy-shared-hosting-888ec96f64cd

The problem is that when I open the website I get some weird error from laravel. Check the image. As you can see, laravel is still pointing to my local folder somehow.. enter image description here

I changed the path in the index.php file like so:

require __DIR__.'/../project/bootstrap/autoload.php';
$app = require_once __DIR__.'/../project/bootstrap/app.php';

The 'project' folder is at the same level as public_html folder. What can be the problem here?

Kirk Beard
  • 9,569
  • 12
  • 43
  • 47
Ovidiu G
  • 1,253
  • 5
  • 25
  • 47
  • you don't need to change anything in server, none of change in `index.php`, just upload whole code. – Bhaumik Pandhi May 25 '17 at 17:21
  • Upload the whole code to public html? Won't that have some security issues? – Ovidiu G May 25 '17 at 17:27
  • Why would it have? Laravel is already having many security concepts, and what security you break here if you upload code to `public_html`? – Bhaumik Pandhi May 25 '17 at 17:29
  • Ok, I'll give it a try and see if it works. – Ovidiu G May 25 '17 at 17:38
  • I'm getting You don't have permission to access / on this server. I tried to move .htaccess from public folder to public_html but same error. – Ovidiu G May 25 '17 at 17:41
  • whoa, just put whole code without any change and point your domain into laravel public folder. – Bhaumik Pandhi May 25 '17 at 17:44
  • @OvidiuG If you dont want to place all you file under public_html folder here is a good link you can follow https://blog.kongnir.com/2015/09/25/setting-up-laravel-5-on-shared-hosting-server/ I have applied this same link so I works – Aatish Sai May 26 '17 at 07:45
  • See this answer on stackoverflow: https://stackoverflow.com/a/57619997/10302693 – Dinesh Suthar Aug 23 '19 at 04:42

0 Answers0