it could be your vhost config file. whenever i get that exception handler error, i check that first and it's usually the case for me.
Try this: sudo chmod -R 777 /var/www/html/laravel/app/storage
thanks merkabaphi... now I can see the starting page that tell me "you are arrived".. I think that now I'm ready to start!.. then the process of apache did not have the rights to write on my project!? well done.. nice job :-)
just another thing, if possible, please... cause I'm learning how to start... simply.. I added to routes.php this code: Route::get('/hello', function() {return "hello!";});
but if I navigate to "http://localhost/laravel/public/hello" response is "not found"... I tried to add in /etc/apache2/sites-available/000-default.conf this section (appended).. but response is always not found... someone can help me how to understand the first configuration? why can't found my route? however, if I remove "/hello" it runs.. response is the web page "you are arrived"
<VirtualHost *:80> # Host that will serve this project. ServerName app.dev
# The location of our projects public directory.
DocumentRoot /var/www/html/laravel/public
# Useful logs for debug.
#CustomLog
#/path/to/access.log common
#ErrorLog
#/path/to/error.log
# Rewrites for pretty URLs, better not to rely on .htaccess.
<Directory /var/www/html/laravel/public>
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
</Directory>
</VirtualHost>
Can you access your route using this url: http://localhost/laravel/public/index.php/hello ?
yes... it works using this url: http://localhost/laravel/public/index.php/hello
but the configuration of vhost that I wrote should allow access with an address that does not include "index.php" right? .. seems to be ignored ..I don't know what I did wrong...
it looks like mod_rewrite of your webserver isn't enabled try: sudo a2enmod rewrite (don't forget to restart apache then)
done.. but this route "http://localhost/laravel/public/hello" returns "not found".. but it is very likely that I did not understand how it should work ...
is it possible to obtain the same result of... http://localhost/laravel/public/index.php/hello using .... http://localhost/laravel/public/hello ?
and even if I want to remove "public"? and then write .. http://localhost/laravel/hello ?
Here, you can see step by step installation LAMP + Laravel - http://laravel.io/bin/OxMy3. I did it on my fresh installed Ubuntu desktop 14.04 . At the end you can access your hello-route by entering http://app.dev/hello . I hope that it will help
thank you very much!... your step by step guide is really very well done! everything works!
merkabaphi said:
Try this: sudo chmod -R 777 /var/www/html/laravel/app/storage
this code help me, thanks :)
mkblade said:
Here, you can see step by step installation LAMP + Laravel - http://laravel.io/bin/OxMy3. I did it on my fresh installed Ubuntu desktop 14.04 . At the end you can access your hello-route by entering http://app.dev/hello . I hope that it will help
Can you post this tutorial again? That link redirects to http://laravel.io/bin
Hi mkblade, kindly paste a link to your tutorial.
ManguruMuiruri said:
Hi mkblade, kindly paste a link to your tutorial.
Sorry I have no idea why the snippet was removed. I will write here again for people who encounter problems by installing laravel on ubuntu.
Ok, let's think that you have installed a fresh copy of ubuntu 14.04.X
// LAMP
sudo apt-get install tasksel
sudo tasksel install lamp-server
//CURL + Composer + mcrypt
sudo apt-get install curl php5-curl php5-mcrypt
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
//activate mod_rewrite + mcrypt
sudo a2enmod rewrite
sudo php5enmod mcrypt
sudo service apache2 restart
//if you have this error:
AH00558: apache2: Could not reliably determine the server''s fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
sudo apt-get install mc (optional)
sudo mcedit /etc/apache2/apache2.conf
<<Line 57 (it can be any line)
ServerName localhost
>>
sudo service apache2 restart
//Creating Laravel Project
cd /var/www/html/
sudo composer create-project laravel/laravel laravel --prefer-dist
sudo chmod -R o+w laravel/storage/
!!At this moment http://localhost/laravel/public/ should be accessible (You have arrived.)
//Creating Virtual Host app.dev
sudo mcedit /etc/apache2/sites-available/app.dev.conf
#/etc/apache2/sites-available/app.dev.conf contains following lines
<VirtualHost *:80>
ServerName app.dev
DocumentRoot /var/www/html/laravel/public
<Directory /var/www/html/laravel/public>
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
sudo a2ensite app.dev
service apache2 reload
sudo mcedit /etc/hosts
#/etc/hosts contents following lines
127.0.0.1 localhost
127.0.0.1 app.dev
...............
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community