Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like a dead-simple web/file server (ideally, something no more complicated than "run this command with these flags") which also allows specifying mime-types based on file extensions. Something like this would be great:

my-file-server --root=path/to/files --additional-mime-types="foo|text/plain"

Does this exist? What are my options? If not, what's the next best thing?

This is in a Linux environment, and I'm only serving the files on localhost.

share|improve this question
up vote 2 down vote accepted

What about lighttpd? Can't remember if it has commandline capabilities though. It does have a conf file for mime types if I recall.

share|improve this answer

The dead simple server: python -m SimpleHTTPServer will set up a webserver on serving content in the CWD

as far as mimetypes, i think it sets something up from it wouldn't be hard to write a script that uses and mimetypes.init() or mimetypes.read_mime_types() to get the mimetype mappings you need. You can get an example 'web server script' from and use that framework to add your mimetype loads someplace in the script.

share|improve this answer
thank you so much! – Marc Guiselin Nov 30 '15 at 2:46

I would go with apache. It is free, it runs on Windows and Linux, it will run all of the mimi types you require and there is a TON of documentation out on the web for it. I have run (am running) Apache on a Windows / Linux environment that hosts a web mail client for my IMAP mail server. Works flawlessly!


share|improve this answer
That's not at all what I would consider simple. To properly run Apache you typically privileged access and must juggle a number of mental constructs. I just want to run a file server with some mime-types configuration, something like serve-this --mime-mapping="foo|text/plain" --root=path/to/site. – John Feminella Oct 6 '10 at 14:23
Most default installations of apache are quite secure and run out of the box. Other than determining where to put your files it is very set and forget. The complexity is there if you want to add features. – BillThor Oct 6 '10 at 14:37
I agree will BillThor. John, you are right it can be very complicated, but not out of the box. I have configured web servers in windows where all I had to was run the install file and change a couple of things in the config file and that was it.... – danbo Oct 6 '10 at 17:41

You don't say what operating system you are using, but I would recommend IIS if you're running Windows. The administration interface is very easy to use.

share|improve this answer
Running IIS seems a bit overkill. I'm thinking something closer to Webrick, ADSF, etc., where no additional configuration is required other than set-it-and-forget-it. – John Feminella Oct 6 '10 at 14:27

Ubuntu server can have a LAMP server up in about 5 minutes. You can configure the mime types in the /etc/apache2/mods-available/mime.conf file.

share|improve this answer

Mongoose can do that:

mongoose -extra_mime_types .txt=text/html,.blah=application/foo
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.