Home > Web Front-end > CSS Tutorial > What should I do if nginx's css doesn't work?

What should I do if nginx's css doesn't work?

藏色散人
Release: 2023-01-03 09:23:30
Original
2832 people have browsed it

nginx css does not work because the file is accidentally deleted. The solution is to open the corresponding file and add the code "include /etc/nginx/mime.types;", and then restart the Nginx guardian. .

What should I do if nginx's css doesn't work?

The operating environment of this article: windows7 system, css3 version, DELL G3 computer.

Why does nginx’s css not work?

Recently deployed a project html, the js loaded normally, and the css did not report 404. The css could be obtained normally, but the browser could not parse it. After some research, I found that it turned out that /etc was changed when configuring Nginx. The line include /etc/nginx/mime.types; in /nginx/nginx.conf was accidentally deleted, causing Nginx to be unable to correctly identify the CSS file, and therefore sent the wrong MIME type to the browser. Add that line, and then restart the Nginx daemon.

What should I do if nginxs css doesnt work?

The wrong css and js types are as follows

What should I do if nginxs css doesnt work?

The correct css and js types should be as follows

What should I do if nginxs css doesnt work?

Recommended: "css video tutorial"

The above is the detailed content of What should I do if nginx's css doesn't work?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template