Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [mime-type]

The tag has no usage guidance.

0
votes
0answers
39 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
1answer
40 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
0answers
24 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
1answer
588 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
0answers
209 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-...
1
vote
1answer
436 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
1answer
1k 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
1answer
171 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. ...
1
vote
1answer
665 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
1answer
1k 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 ...
0
votes
1answer
2k 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 ...
2
votes
2answers
234 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 ...
0
votes
0answers
241 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 ...
1
vote
0answers
601 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
1answer
4k 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 ...
4
votes
1answer
7k 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
2answers
4k 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: ...
0
votes
1answer
2k 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
1answer
527 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
3answers
2k 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/...
0
votes
1answer
300 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
0answers
388 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 ...
0
votes
0answers
2k 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
1answer
1k 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 ...
1
vote
1answer
759 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 ...
0
votes
0answers
588 views

Enable gzip for source maps

I'm using the Grunt plugins to concat, minify and generate source maps of my Javascript before I push it to the production server (I'll soon be doing the same with SASS for CSS). The source maps ...
0
votes
1answer
763 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 ...
4
votes
2answers
1k views

How to set different mod_mime rules for reverse proxy?

By default, httpd contains the following configuration: <IfModule mime_module> # # TypesConfig points to the file containing the list of mappings from # filename extension to MIME-...
2
votes
1answer
2k 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 ...
1
vote
0answers
88 views

IIS virtual folder mime types

Consider following scenario. I have physical folder with mp3 files. I want these files to be served with application/octet-stream mime when accessed via http://example.com/dl/foo.mp3 and with audio/...
2
votes
1answer
4k 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, ...
0
votes
2answers
766 views

Create Exception on Mime filtering on squid

I have a server with the operating system Ubuntu 12:04 LTS version. I also paired the squid version 3.1.19 on my server. with the client about 30 units. to prevent my clients to download any files ...
0
votes
2answers
752 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
1answer
126 views

Remove unrecognised staticContent mimeMap entries

On a default installation of IIS there are approximately 350 <mimeMap /> elements specified in the <staticContent> section. Some file extensions seem alien to me e.g. .sv4cpio, .cpio, ....
0
votes
2answers
269 views

How does lighttpd/nginx determine filetype of a file? (which method?)

I want to configure my lighttpd to serve some static files, with compression capability. The files are plain text but they have .bin extension. I have these lines in my lighttpd configuration: ...
0
votes
1answer
1k 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 ...
0
votes
2answers
2k views

Wrong mime-type for css and js files

I am new to Apache. I have almost no knowledge of apache. I am using apache 2.2.11. I have one css file and multiple .js files which i am uploading to a remote storage with a php page(PHP - 5.2.8). ...
1
vote
2answers
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....
0
votes
1answer
2k views

xdg-mime returns “xprop: unable to open display '' ”

I'm attempting to track down a problem with a particular CSS file being returned as text/html instead of text/css. file -mime install.css returns some less useful info: install.css: text/x-c; ...
0
votes
1answer
317 views

IIS7 403 for custom mime type

I have added in a custom mime type (epub) as "application/epub" into IIS7. This was working originally but something seems to have stopped it working and now we get the response "403 Forbidden: body ...
1
vote
2answers
2k views

Cannot load IMG without specifying extension

I just moved to a new server. All my site is including images without extensions. () but the new server doesn't seem to recognize this files unless I add each file's extension which I don't know so I ...
9
votes
1answer
3k 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 ...
0
votes
1answer
3k views

NGINX MIME TYPE

I have my nginx conf file so that when ever a mobile device visits my site the url gets rewritten to m.mysite.com I did it by adding the following set $mobile_rewrite do_not_perform; if ($...
5
votes
1answer
2k 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/...
18
votes
3answers
51k views

How can I make sure that Nginx serves plaintext files as a download, instead of inline?

I have Rails application (Redmine) which works with Nginx. If I am clicking on any attachment my browser (firefox, ie, chrome) ask me to download file. But if I am clicking on txt-type attachment my ...
1
vote
0answers
112 views

How to specify proper mime for javascript in apache?

I'm trying to set up mod_mime for javascript. My webserver returns this content-type for js files: Content-Type:application/x-javascript; charset=utf-8 so obviously the directive ExpiresByType ...
2
votes
1answer
992 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? ...
2
votes
1answer
1k views

Limit file upload per type with NGinx

On 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 ...
1
vote
2answers
2k 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
1answer
2k views

Lighttpd doesn't read mime-type from files without an extension

I have a folder with images that I need to be lightweight hosted. So I decided to go for lighttpd. So I read that I had to add the following option in the config file: mimetype.use-xattr = "enable" ...