I am trying to setup an existing laravel project in my localhost. I am using Linux Mint along with Valet Linux 2.0
Valet linux works fine as I am able to setup new laravel project which works fine. But now I am trying to setup an existing laravel project. Project is running, all links are working. But none of the static files like js, css, images are loading. I am getting 500 status code for all static files. Not able to understand what is going wrong, I have checked .htaccess also.
I will be thankful if anyone can help.
I was having the same issue with Valet.
Try to move your static files from root folder to public folder.
This fix worked for me.
Related
I used jetstream laravel authentication and I used npm run dev and keep it running on my cmd while I developed my project locally. Everything was OK till here. But now I want to upload on a shared hosting. And I got it that I need to run npm run build now. I have run it locally and uploaded the files but my ui of my project has been all scattered and misplaced. So I know I have missed a/some steps. What really have I missed out or have wrongly done.I am stuck now.
Regarding my web hosting ,I have my project files outside the public_html. All the public files are moved in this folder public_html.My database and my application working fine except the ui is messy.
I have find out a way but still do not know whether it is the best solution or proper one.
What actually the scenario is that the build folder of the npm run dev is folder project_folder/public/build but I have my project files outside the public_html folder. So it was unable to find the manifest.json in the folder project_folder/public/build. It was not working ,the UI is very ugly. Then, I put only the manifest.json in project_folder/public/build but the app.####.cs and app.###.js is kept in the public_html/build/assets. And now it is working fine. Hope this help someone like me, even though it might not be the right approach.
I tried many strategies to deploy two Laravel apps in shared hosting. What I have done so far is
created a folder inside public_html folder (vocalpublic) and put all the Laravel public folder files in there.
All the other Laravel project files except public folder have placed outside the public_html folder (example.co.uk)
I have many addon domains, and in this case, I created one (example.co.uk) which was created a folder outside the public_hml folder, and that's where I drop laravel files.
Final result:
Thanks for the viewers.
I found the solution. The PHP version of my server is 7.1 max but my Laravel 7.2 need at least PHP 7.2 version. So what I did was downgrade the Laravel app into version 5.8, and everything works fine.
Thanks.
I am trying to develop a laravel site. I am trying to apply a template in the blade files. I have added the necessary folder to my public folder. This file is also working correctly in my friends pc but not on my pc. Can anyone help me with the problem?
I also copy paste my friends which works fine in his pc but not on my pc.
I have a laravel project running on Linux server without any issue. The files are in /public_html directory and "laravel" directory is out of public_html. It has mySQL 5.6 and PHP 7.1. The project works completely fine.
Now, we have decided to move this on windows server. I have setup same PHP and mySQL on new windows server. I have double checked and this is correct.
I have imported entire database to windows and files have been moved as below:
The files from /home/abcuser/public_html/ directory to
C:\HostingSpace\abc.com\wwwroot
The files from /home/abcuser/laravel directory to
C:\HostingSpace\abc.com\laravel
The IIS has site path as below:
C:\HostingSpace\abc.com\wwwroot
I set all required permissions to these directories and updated database connection in .env file.
I am now getting blank page with no error message. Do I still need to make any changes in code? Did anyone has experienced the same?
Finally got this fixed..
I had to enable some PHP extensions. What I did is:
Checked the list of disabled PHP extensions from IIS of concerned
site.
Checked whether the particular extension is enabled in oldserver where
it is working.
And Enabled it as needed.
I am new to laravel, I have installed the laravel on my local server(Xampp) with composer. I have a small project that is build in the laravel now I am getting trouble to run that project on the xampp.
Thanx in advance
Just point your folder in apache.conf to your laravel public folder and you will be able to run your project in windows.
Follow this guide to do so:
How do I change the root directory of an apache server?
Please read the docs about the installation for any other problems you may have.
http://laravel.com/docs/5.1/installation