I installed version 29 and clicked on the file to view it, but it turned into downloading, which is weird.

ubuntu24 LTS. Clicking .jpg .pdf .mp4 will turn into download files. I have cleared the browser cache and changed to a different computer, but it is still the same. Can you help me analyze it?

nginx+mariadb

In version 28, everything is normal. Whether I upgrade or install it from scratch, in version 29, it will turn into a download file. I have been troubled for 1 week. Thank you.

This sounds like an incorrect Nginx configuration.

What comes to my mind in this regard: Make sure that you provide information about the MIME types in your Nginx configuration. This is usually done by including the following file.

include /etc/nginx/mime.types

But without the NGINX configuration, I don’t think anyone here can help you.

1 Like

Thanks for your reply. I think you are right. I modified:
vi /usr/local/nginx/conf/mime.types
application/javascript js;

changed to:
application/javascript js mjs;
This should solve the problem. I share it with you, hoping it can solve the problem you encounter.