dousheyan0375 2017-09-28 21:43
浏览 10

Laravel在共享主机上部署麻烦

I had a problem when I tried to deploy my Laravel project on a shared hosting (hostinger.com)

I have followed tutorials by putting all the files of public in public_html. It works but it shows me that layouts.master wasn't found.

View [layouts.master] not found. (View: /home/u102686349/OneGram/resources/views/index.blade.php) in FileViewFinder.php (line 137)

Please tell me what to do

  • 写回答

1条回答 默认 最新

  • dtf54486 2017-09-29 04:23
    关注

    (1) Make sure that you point your website to Your_Laravel_project_Folder/public.Because laravel serves the file from the project's public folder.

    (2) Lets say if you have a web folder like www or /var/www on your hosting provider, then you copy the laravel app to www or /var/www and then in your httpd.conf or vhost or your nginx conf file, your website folder should be set as www/Your_Laravel_project_Folder/public or /var/www/Your_Laravel_project_Folder/public.

    (3) After this, go to your laravel project folder using ssh (you should have artisan app already install on project root folder for this step. It should come by default with Laravel). Then try running this command from terminal if you can ssh to your webhost : php artisan cache:clear && composer dump-autoload. Probably this will resolve the issue.

    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度