Laravel runs on the "/public/" directory. So you should see it under http://localhost/tasks/public.
If it doesn't run there, or it shows some kind of enrror, may be the .htaccess wrong configuration. By default, Laravel doesn't like to run under a /public/ URI, so just before:
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
in your .htaccess in /public/, add:
# Change the base rewrite
RewriteBase /tasks/public/
BTW, that type of "empty" page it shows to you? Be more specific. Do you get 404? 503?
Thank you for helping me, DarkGhostHunter.,
On http://localhost/tasks/public I get a 500 Internal Server Error .
The .htaccess in /public/ is:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Change the base rewrite
RewriteBase /tasks/public/
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>>
As you can see I added what you told me. I don't undestand this files so maybe I put it in the wrong place. But the .htaccess file was already generated, I didn't create it.
I also tried cloning the quickstart guide from git
git clone https://github.com/laravel/quickstart-basic quickstart
but http://localhost/quickstart/public also failed to load.
check your logs to find out what the 500 error is. Do you have the correct permissions setup ?
Laravel is very easy to install, make sure u:
having any other issues or u wanna remove public in the address, add me up on facebook: fb.me/ojo.kayodeemmanuel.5 or whatsapp: 2348166575861
lagbox said:
check your logs to find out what the 500 error is. Do you have the correct permissions setup ?
Apache log "says":
[Mon Jan 04 20:28:51.519241 2016] [:error] [pid 20308] [client 127.0.0.1:52534]
PHP Fatal error: Uncaught UnexpectedValueException: The stream or file "/var/www/html/tasks/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied in /var/www/html/tasks/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:87\n
Stack trace:\n
#0 /var/www/html/tasks/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(37): Monolog\\Handler\\StreamHandler->write(Array)\n
#1 /var/www/html/tasks/vendor/monolog/monolog/src/Monolog/Logger.php(289): Monolog\\Handler\\AbstractProcessingHandler->handle(Array)\n
#2 /var/www/html/tasks/vendor/monolog/monolog/src/Monolog/Logger.php(565): Monolog\\Logger->addRecord(400, Object(Symfony\\Component\\Debug\\Exception\\FatalErrorException), Array)\n
#3 /var/www/html/tasks/vendor/laravel/framework/src/Illuminate/Log/Writer.php(202): Monolog\\Logger->error(Object(Symfony\\Component\\Debug\\Exception\\FatalErrorException), Array)\n
#4 /var/www/html/tasks/vendor/laravel/framework/src/Illuminate/Log/Writer.php(113): Illuminate\\Log\\Writer->writeLog('error', Object( in /var/www/html/tasks/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php on line 87
What are the correct permissions?
Ok, I found this. It says that I needed to do:
chmod 755 -R laravel
so now I get to a page where it shows me a label, a text field and a button to Add a Task. When I press this button it sends me to http://localhost/task, not to public/tasks.
Is it really THAT difficult to learn Laravel???? I can't believe this is the way. Even following an official tutorial one can't get anything to work!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community