Support disabled open_basedir restriction, so once again I changed the paths from public to public_html and it works now, no .htaccess magic needed either.
How to organize folders for Laravel on a conventional web host?
Question
If I have the entire Laravel project inside public_html
, I have to go to http://domain.com/public
to access it, but if I put the contents of Laravel's public
inside public_html
, the rest of the files in Laravel would be looking for a folder called public
, that is now called public_html
.
Also, if I rename public_html
to public
, it won't work either.
I've tried changing 'public' => __DIR__.'/../public
to 'public' => __DIR__.'/../public_html'
on /bootstrap/paths.php
When I try to load http:/domain.com
it says:
Warning: require() [function.require]: open_basedir restriction in effect. File(/home/domain/bootstrap/autoload.php) is not within the allowed path(s): (/home/domain/public_html:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/domain/public_html/index.php on line 21
Warning: require(/home/domain/bootstrap/autoload.php) [function.require]: failed to open stream: Operation not permitted in /home/domain/public_html/index.php on line 21
Fatal error: require() [function.require]: Failed opening required '/home/domain/public_html/../bootstrap/autoload.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/domain/public_html/index.php on line 21
'public' => __DIR__.'/../public
to 'public' => __DIR__.'/../www'
on /bootstrap/paths.php
doesn't work either
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow