Questions tagged [mime-type]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
4k views

Set content-type header for jsonp in htaccess

I'm having trouble with a 3rd-party javascript game that is installed on my site, where the content-type response header being returned is application/json rather than application/javascript for a ...
3 votes
3 answers
9k views

Apache reverse proxy AH01597: could not open mime types config file

I'm trying to configure Apache HTTP server 2.4 as a reverse proxy on RHEL 7 server. When Apache starts up it complains in its log file (/var/log/httpd/error_log): AH01597: could not open mime types ...
0 votes
1 answer
88 views

mod_expires ignores webp and avif expiry/cache settings

I spent an hour or so diagnosing this problem today, and thought the solution might be helpful to others. Apache's response headers were giving webp and avif files the default expiration (60 seconds), ...
0 votes
1 answer
194 views

Hosting Laravel Filament apache server responded with a MIME type of ""

I been trying to host my laravel filament project into my server using apache but upon deployment i met 2 problem i never seen before pic related Failed to load module script: Expected a JavaScript ...
0 votes
0 answers
234 views

After adding .7z mimetype to IIS server .jpg stopped to show up on the site with 500

I've added .7z mime type with text/plain to my IIS server on Windows Server 2019. After that site's web.config was added the block (I didn't do that) <staticContent> <mimeMap ...
1 vote
1 answer
2k views

Web server serves up PDF file as wrong mime type

Following an upgrade to the latest version of Joomla, downloads from a website I am working on are being served incorrectly. Example page: http://www.pacificpolicy.org/index.php?option=com_content&...
0 votes
1 answer
3k views

Can I manually give mime types?

In my /etc/nginx/sites-enabled/default I have taken out the following line: include mime.types; On my website I have 2 files that are accessible (.png, .mp3). Is there a way I can manually give them ...
3 votes
1 answer
8k views

Nginx: serving files as text without having .txt appended to it

I have some .rb (Ruby script) files that I link to on my website. By default, the browser just downloads them to the "Downloads" folder, as it does zip files. I want the browser to treat it as text, ...
3 votes
1 answer
3k views

Limit file upload per type with NGinx

In my project, I will allow users to send zip files and images files (on two different form post). The project is developed with Play! Framework (not PHP). I'd like to limit the size of upload for 1MB ...
0 votes
1 answer
2k views

IIS returning 404 on PDF File

I have a IIS 10.0 server that everything is working fine, with one issue. Any .pdf file returns 404. I know permissions are correct as all the image files in the same folder are working fine. The ...
1 vote
0 answers
179 views

Response with and in memory file with Django and nginx

I have a piece of code that works fine on my local setup (Django embeded dev server running on Windows) but not on server (ubuntu + gunicorn + nginx) I build an Excel file et send it from memory like ...
3 votes
1 answer
1k views

css files are reported as text/plain by mimetype on ubuntu machine

When I run the following command mimetype -DM --database /usr/share/misc/magic /path/to/reset.css I expect to see text/css as a result but instead I get text/plain. Is there a way to fix this? ...
-1 votes
1 answer
145 views

How to let webmail show html part of an email?

I send an email which has a text mime part and a html mime part. When I receive the email using a client app such as Windows Mail, the html version of the email is shown in the client, which is good. ...
0 votes
2 answers
1k views

Apache sometimes showing blank page

I am setting up an Ubuntu 12.04 server with a LAMP stack on a VPS for the very first time. My problem is that Apache refuses to show PHP pages I upload to the server, there's just a blank page. The ...
9 votes
2 answers
5k views

Can I alias all directory requests to a single file in nginx?

I'm trying to figure out how to take all requests made to a particular directory and return a json string without a redirect, in nginx. Example: curl -i http://example.com/api/call1/ Expected ...
3 votes
2 answers
34k views

How to make NGINX server JSON files with the type application/json instead of text/plain?

My server is serving my "manifest.json" file as text/plain which means the browser can't read it. There is definitely a line for it in /etc/nginx/config/mime.types application/json ...
3 votes
1 answer
3k views

Nginx not adding expires headers to fonts, not changing mime types

I have the following location block in my server block in /etc/sites-available/example.com: location ~* \.(ttf|woff|woff2|eot|mp4|css|gif|ico|jpeg|jpg|js|png)$ { expires max; ...
11 votes
3 answers
6k views

nginx, x-accel-redirect and mime types

In my nginx 0.8.34 setup I'm using the X-Accel-Redirect feature to control file downloads in the application code while not having the application handle the download itself. After much pain this now ...
0 votes
0 answers
86 views

Is there a MIME type assigned to a simple Unix configuration file type?

When I check with file <unix>.conf, it tells me ASCII text (text/plain as an actual MIME type), which is correct, but I was wondering whether there was a MIME type defined for a simple Unix like ...
2 votes
1 answer
862 views

Have files with querystring included in their name. Need nginx to ignore querystring for the content header

Have a directory with lots of files. These are all static files from backups. The issue is that some files that are named like the following: mystyle.css?version=3.3.1 When serving the files, nginx ...
0 votes
0 answers
423 views

Tomcat fiilter traffic basing on bad mime type

I have spotted recently a large amount of malicious traffic causing throwing an errors on our Grails app. It is hosted via tomcat: ERROR grails.plugin.cache.web.filter.simple....
0 votes
1 answer
4k views

Error 404 or 500 when downloading large static JSON file in IIS 7

What I wanted to do was fairly simple you would think. Create static json file so browsers can cache output and you don't have to poll the database for large chunks of data. So I created a JSON file ...
0 votes
2 answers
2k views

How Nginx can open all ASP files as text/html?

I've a lot of files with ASP extension running on linux, but I can't rename. The content of that files is HTML, but when I open, the Nginx takes me to download. Does anyone know what I can insert on ...
1 vote
0 answers
454 views

change mime type for one user agent

I'm trying to overwrite the mime type of a file for a specific User Agent only (Chrome) and leave the default for the others (Firefox). Options +Indexes IndexOptions -FancyIndexing Header set Access-...
5 votes
1 answer
3k views

Insert MIME type of an URL into Apache's access_log

I would like to enhance my logfile with an additional field containing the mime type. E.G. 127.0.0.1 - - [01/Mar/2012:20:49:36 +0100] "GET / HTTP/1.1" 200 255 [...] "text/html" 127.0.0.1 - - [01/Mar/...
1 vote
1 answer
2k views

Mime Magic on files without extension on Apache/2.2.31 and mod_wsgi 3.4

Sorry in advance for the length, thanks for your patience. I have an ancient production server that no one knows how it was built. It uses apache+mod_wsgi to run a Cherry Py python application to ...
1 vote
1 answer
4k views

Ngingx returns 404 on local .ttf font

I have a local .ttf font which I need to use. I have tried to edit mime-types application/x-font-truetype ttfl also tried application/x-font-ttf ttf; And mysite.conf looks like this: server { ...
0 votes
1 answer
396 views

How do I proxy based on MIME type?

How do I proxy a file in Apache based on its MIME type? I want to use PHP-FPM with FastCGI but the recommended solution using ProxyPassMatch is clunky, a pain to work with, and all around unfavorable. ...
2 votes
2 answers
795 views

Lotus Domino HTTP: Define MIME types

My Lotus Domino 9.0 server serves the application cache manifest as application/octet-stream, where the browser expects text/cache-manifest. I only found examples how to add a MIME type to Apache and ...
2 votes
1 answer
2k views

IIS How to allow a single file as browsable

I'm using IIS 7.5 and my goal to allow this one json file as browsable however I don't want any other json files to be accessible when navigating through the URL, therefore the typical IIS 404 page ...
1 vote
2 answers
3k views

Nginx: How to serve different urls with different settings from one file?

I have thousands of text files named like ABC. I'd like to access those files from different URL: - if it is ABC or ABC.txt I'd like to add default_type text/plain and serve that file - if it is ABC....
3 votes
2 answers
10k views

Mime type received as "text/html", server configured to send as "text/javascript"

Both firefox and chrome are showing that javascript files from my server are served as MIME type text/html. The javascript files have a .js extension. First, mime_module is installed and active: ...
1 vote
2 answers
4k views

IIS: Request with unknown content-type denied

I have an IIS7.5 box running an asp.net mvc 3 application. The application receives binary POST requests and returns a binary answer. To distinguish this binary data from all other packets I setup my ...
2 votes
2 answers
3k views

Mime types get removed by iisreset

I am trying to deploy a Silverlight app to iis on a Win 2003 server. I add the mime type for silverlight to iis ( .xap, application/x-silverlight-app ) and then restart the app pool, and the app ...
0 votes
0 answers
648 views

IIS 404 Not Found for only SOME resources...same permisions set

I am pretty stumped because IIS is returning 404 not found for a handful of resources, but not others. I checked the permissions to make sure they are set exactly the same way. The paths are also the ...
9 votes
1 answer
25k views

nginx how to override/add single mime-type

I tried to add markdown rendering by putting types { text/markdown md; } into server section, but then index.html stopped to be rendered all of a sudden. I can explain this only if types overrides ...
1 vote
0 answers
1k views

MIME/Content type changed after change in server

This is my first question so I apologize if I my post has any mistakes. I've searched about this issue for close to two days now and I still only am a bit closer than I was before.Here is my problem. ...
0 votes
1 answer
2k views

Subversion: Wrong global-ignores / can't see mime-types

I'm currently testing Subversion on a Server. As you can see in my config file below, I did following edits: A: I added global ignores: global-ignores = *thumb.db *.tmp B: I enabled auto-props ...
4 votes
2 answers
13k views

What is AddType application/x-httpd-php-source

I have Apache 2.0, PHP 5.2.4, and this directive in the httpd.conf: AddType application/x-httpd-php-source .php .php3 .php4 .php5 .php6 AddType directive is used to maps the given filename ...
1 vote
1 answer
3k views

video/mp4 vs video/mpeg mime type

I need to add some .mp4 videos to a course in my LMS (Moodle) on a Windows 2008 R2 server. I'm using IIS 7.5 as the web server. While searching the www for the correct way to do it I've found several ...
1 vote
1 answer
1k views

Apache returning incorrect mime type for meta-data.xml.md5

I'm struggling to get apache2 to serve a file with the correct mime type. I'm using an installation of apache 2.2 installed with apt-get on Ubuntu. The file in question is a maven repository file ...
3 votes
3 answers
3k views

How to serve giziped text files with nginx

To save space we gzip all our logs and text files and these files are browsed by the user, but these files are downloaded instead of opened in the browser, I couldn't find a way to set mime-type text/...
1 vote
1 answer
1k views

Using mime_header_checks to ACCEPT instead of REJECT?

I'm pretty well versed in using header_checks/mime_header_checks to refuse smtp mail in Postfix, but now I think I've gone off the path of righteousness; I'm trying to suss out a way that I can refuse ...
6 votes
1 answer
2k views

Apache treating files with ".var[.]" in their names as type-maps

So today at work I ran into a strange problem. An application I was writing had a JavaScript file named form.sales.var.js, placed in the same directory as other JS files. However, when the browser ...
0 votes
2 answers
2k views

Apache is sending php files to my browser instead of parsing

I have to set up PHP on an existing web host. I have made a virtual host entry, but for some reason Apache is sending the PHP to the browser instead of parsing.. from googling around it looks like it'...
0 votes
1 answer
427 views

GIF loses mime type with Apache rewrite

Got problem with a gif that loses it's animation with the rewrites I'm doing. RewriteRule ^journal/(.+)\.(jpeg|jpg|png|mp4|webm|ogv)$ app/uploads/journal/$1 [QSA,L] RewriteRule ^journal/(.+)\.(gif)$ ...
1 vote
0 answers
421 views

CentOS - Files to Copy to get Consistent MIME-type detection in PHP

I have the same website (written in PHP) running on two servers. I've tried uploading the same exact file to both servers through the website. On one of the servers, the file's mimetype is detected as ...
2 votes
1 answer
4k views

IIS ignoring mime-type settings and serving file as application/octet-stream

We added both handlers and mime-types for IIS in the web.config to tell the server how to handle the different types of audio and video files we are using on the site. IIS does not seem to be ...
0 votes
0 answers
3k views

NGINX downloads text file instead of displaying it

I have Nginx installed with the following nginx.conf: user nginx; worker_processes 1; error_log /var/log/nginx/error.log; pid /var/run/nginx.pid; events { ...
0 votes
1 answer
3k views

How to correct the MIME type from being recognized as text/x-asm to text/css?

The styles.css file is not loading on my web page, and I am hosting on Amazon S3. It appears that my styles.css file is being recognized as text/x-asm instead of text/css as stated in my index.html ...