0

I've been trying to get laravel welcome sreen for entire day and nothing..

Here's what I do :

1) Install laravel via composer to the /var/www/html/ like this :

composer create-project laravel/laravel laravel_v1 4.2 --prefer-dist

2) When I run command

php artisan serve

It says is started on localhost:8000 and when I go there I get welcome screen.

3) Now I create vhost file in /etc/apache2/sites-available called myapp.conf, that has the following content :

<VirtualHost *:80>
 # Host that will serve this project.
    ServerName      app.dev

    # The location of our projects public directory.
    DocumentRoot    /var/www/html/laravel_v1/public


    # Rewrites for pretty URLs, better not to rely on .htaccess.
    <Directory /var/www/html/laravel_v1/public>
        <IfModule mod_rewrite.c>
            Options -MultiViews
            RewriteEngine On
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteRule ^ index.php [L]
        </IfModule>
    </Directory>
</VirtualHost>

Now when I go to app.dev in my browser all I get is apache welcome page. What am I doing wrong in here? Could you please help this young man so he can start with some coding. Thank you.

1
<VirtualHost *:80>
    ServerName app.dev
    ServerAlias www.app.dev

    DocumentRoot /var/www/html/laravel_v1/public"
    <Directory "/var/www/html/laravel_v1/public/">
     <IfModule mod_rewrite.c>
         Options -MultiViews
         RewriteEngine On
         RewriteCond %{REQUEST_FILENAME} !-f
         RewriteRule ^ index.php [L]
     </IfModule>
    </Directory>
</VirtualHost>

there is mistake in relative path.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.