Support the ongoing development of Laravel.io →
Installation Configuration
Last updated 1 year ago.
0

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.

Last updated 1 year ago.
0

Try this: sudo chmod -R 777 /var/www/html/laravel/app/storage

Last updated 1 year ago.
0

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 :-)

Last updated 1 year ago.
0

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>
Last updated 1 year ago.
0

Can you access your route using this url: http://localhost/laravel/public/index.php/hello ?

Last updated 1 year ago.
0

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...

Last updated 1 year ago.
0

it looks like mod_rewrite of your webserver isn't enabled try: sudo a2enmod rewrite (don't forget to restart apache then)

Last updated 1 year ago.
0

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 ?

Last updated 1 year ago.
0

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

Last updated 1 year ago.
0

thank you very much!... your step by step guide is really very well done! everything works!

Last updated 1 year ago.
0

merkabaphi said:

Try this: sudo chmod -R 777 /var/www/html/laravel/app/storage

this code help me, thanks :)

Last updated 1 year ago.
0

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

Last updated 1 year ago.
0

Hi mkblade, kindly paste a link to your tutorial.

Last updated 1 year ago.
0

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

            ...............
Last updated 8 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

girtri girtri Joined 25 May 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.