php - centos environment laravel5.4 css, js, image error 404
黄舟
黄舟 2017-06-29 10:07:56
0
2
735

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!

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(2)
滿天的星座

Resource files in Laravel are dynamically loaded and need to be replaced by templates:

<link ..... href="{{URL::asset('css/....')}}">
巴扎黑


Try removing this comment

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template