The server software is apache2.4, php7. The result picture shows garbled characters, which is the same as opening it with txt. It is probably a configuration problem, but I don’t know where the specific problem is. I hope you can give me some advice.
The picture shows the test connection: http://shouke.luopan.me/test.jpg
The reason is that the mime type is not configured properly.
And check whether the mime module is loaded, similar to the configuration ofBut the default
/etc/mine.type
should be fine, so I guess you deleted something in the apache configuration./etc/mine.type
应该是好的,所以估计是你在apache的配置里删除了什么东西吧。所以主要看,配置里有没有类似:
TypesConfig /etc/mime.types
的配置。并且看一下mime模块有没有加载,类似与
LoadModule mime_module /usr/lib/apache2/modules/mod_mime.so
的配置如果都有可能就是 你的 /etc/mime.types 有问题。可以在apache的配置里加一句。
AddType image/jpeg .jpg .jpeg
So the main thing to check is whether there is a configuration similar to:TypesConfig /etc/mime.types
.LoadModule mime_module /usr/lib/apache2/modules/mod_mime.so
🎜If so, it may be that your /etc/mime.types has it question. You can add a sentence to the apache configuration.AddType image/jpeg .jpg .jpeg
. But this only solves the problem of jpg files. Since this should be good in the default configuration, but it is not working, so it is estimated that a certain configuration sentence has been deleted, resulting in the apache configuration that is not imported by default on the system)🎜