简体   繁体   中英

Laravel deployment trouble on shared hosting

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) 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM