H
H
HeartOfProgrammer2016-02-07 17:49:13
open server
HeartOfProgrammer, 2016-02-07 17:49:13

Why can't I get laravel to look in the public folder?

Download laravel 5.1 like this:

composer create-project laravel/laravel ganja.local "5.1.*"

after that he added his ganja.local folder to openserver, so that when he entered the ganja.local domain, he immediately showed the site on the local server. Everything seems to be done correctly, but ganja.local shows the entire list of files and folders in the ganja.local folder, and if you enter ganja.local/public, then only then laravel shows the main page.
PS what is my reason for not setting correctly?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
Victor, 2016-02-07
@v_decadence

d9ff8bfdb6ff425893f266361ec13157.png

M
Muhammad, 2016-02-07
@muhammad_97

2 options - either specify the path in the server config, or add htaccess (I don’t know how it is with nginx):

<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

E
Eugene, 2016-02-07
@Nc_Soft

Don't worry https://laravel.com/docs/5.2/homestead

A
Alex Wells, 2016-02-09
@Alex_Wells

The easiest option.
eb70467dbb374c809fafb123e8a7a60e.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question