Deploy the laravel5.4 project to the Linux environment, and all css, js, and images will report errors 404.
My project directory is: /usr/local/nginx/html/oshop.
Code: (I introduced /public/css/index/base.css [as an example])
This is .blade.php:
This is the static file directory under public:
This is the error message of the access error:
If you access this css file, the error message is as follows:
Then I wondered if it was a problem with my nginx configuration:
This is my nginx.conf file:
Now I want to know what is the reason for this error? How to fix this error?
Thank you, Code happy!
滿天的星座2017-06-29 10:09:56
Resource files in Laravel are dynamically loaded and need to be replaced by templates:
<link ..... href="{{URL::asset('css/....')}}">