Starting with laravel on ubuntu

前端 未结 6 2214

I\'m trying laravel as a PHP framework, I have already extracted the laravel zip into ~/opt/xampp/htdocs/laravel but when I go to localhost/laravel

相关标签:
6条回答
  • 2020-12-02 08:25

    Change permission to the storage and bootstrap folders like so

    sudo chmod -R 777 ./storage ./bootstrap
    
    0 讨论(0)
  • 2020-12-02 08:29

    In your .htaccess file:

    RewriteRule ^index.php(.*)$ /public/index.php [L]
    
    0 讨论(0)
  • 2020-12-02 08:30

    Your on the right track, after install of laravel you need to ensure the storage directory has the correct permissions:

    sudo chmod o+w storage 
    

    Then make sure you are serving your public folder and not your laravel folder in apaches document root

    <VirtualHost *:80>
        DocumentRoot /Users/JonSnow/Sites/MySite/public
        ServerName mysite.dev
    </VirtualHost>
    

    Both requirements are covered here

    0 讨论(0)
  • 2020-12-02 08:39

    On the Laravel forum, Kaspien gave this usefull answers:

    You do have to chmod 777, but only on the storage/views folder to use blade, which happens to be the view engine the default Laravel view uses. I usually chmod 777 all storage/* directories on a fresh install of Laravel before I start a project, since they have to be writable for views, sessions, etc.

    From the thread: http://forums.laravel.com/viewtopic.php?id=1552

    0 讨论(0)
  • 2020-12-02 08:40

    for just getting start with laravel, I just do these following steps:

    sudo chmod -R 770 /your/path/to/laravel/folder/
    

    then add www-data group to your laravel

    sudo chgrp -R www-data /your/path/to/laravel/folder/
    
    0 讨论(0)
  • 2020-12-02 08:41

    Final Update
    I finally solved it, what happened was that the laravel folder was read protected, what i had to do was to set chmod 755 -R laravel and then chmod -R o+w storage and voila i had laravel up and running, thanks to everybody that contributed.

    0 讨论(0)
提交回复
热议问题