配置laravel需要注意的问题

1:stroage目录要可写

chmod -R 766 stroage #必须要可写,否则会500报错



2:当使用apache虚拟主机时URL重写需要加入<Directory> 
<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot webpath
    <Directory  webpath>
            AllowOverride ALL
    </Directory>
    ServerName laravel.myfreax.com
    ErrorLog logs/laravel.myfreax.com-error_log
    CustomLog logs/laravel.myfreax.com-access_log common
</VirtualHost>


3:站点载入过慢


composer dump-autoload --optimize

OR

php artisan dump-autoload





你可能感兴趣的:(配置laravel需要注意的问题)