107

A few years ago I used a super simple free web server for Windows.

The only thing you had to do was copy an exe to a dir, double-click that exe, and - voilá - that dir was now accessible over HTTP.

The only problem is that I can't find that little gem...

Franck Dernoncourt
  • 20,384
  • 48
  • 186
  • 322
Martin R-L
  • 1,383
  • 2
  • 10
  • 15
  • Was it Sami?...http://www.softpedia.com/get/Internet/Servers/WEB-Servers/Sami-HTTP-Server.shtml – Moab Jan 09 '11 at 20:23
  • 10
    This is very constructive; just convert it to community-wiki. – Synetech May 13 '14 at 02:19
  • 2
    Since the question got closed here, I've opened one on the Software Recommendation SE: [Web server to easily make a directory accessible over HTTP](https://softwarerecs.stackexchange.com/q/79719/903) – Franck Dernoncourt Jun 24 '21 at 20:57

10 Answers10

78

I recently used mongoose for this purpose. It supports Windows. From the homepage:

Mongoose executable does not depend on any external library or configuration. If it is copied to any directory and executed, it starts to serve that directory on port 8080. If some additional config is required - for example, different listening port or IP-based access control, then a mongoose.conf file with respective options (see example) can be created in the same directory where executable lives. This makes Mongoose perfect for all sorts of demos, quick tests, file sharing, and Web programming.

Wes
  • 1,035
  • 8
  • 8
58

If you have python installed, you can use it to serve the current directory over HTTP:

python -m SimpleHTTPServer

By default, it binds to port 8000.

To choose another port:

python -m SimpleHTTPServer 9000

You can even have CGI support if you use CGIHTTPServer instead. Just make sure that the CGI scripts are in a cgi-bin subdirectory.

SimpleHTTPServer and CGIHTTPServer are python modules that come bundled with standard python installs.

I'm pretty sure that most scripting languages have similar tricks, python just happens to be my favorite swiss army knife.

Of course, python is much bigger than a single small standalone executable, but it just happens to be installed on every computer I ever touch.

vtest
  • 5,130
  • 2
  • 27
  • 27
23

Nginx for Windows is like that. Extract, run the executable, and place your documents in the html folder.

John T
  • 163,373
  • 27
  • 341
  • 348
  • 1
    "place your documents in the html folder" I already have a folder as stated. I don't want to copy any files anywhere. – Martin R-L Jan 16 '11 at 18:47
  • 5
    @Martin then it's as simple as opening up nginx.conf and changing the document location. You can also use the mklink tool in Windows to point the html folder to your folder. – John T Jan 16 '11 at 21:19
  • for dev purposes it can be useful to disable caching and add `server { ... location / { ... expires -1; }` to `conf/nginx.conf` – Andreas Covidiot Oct 25 '21 at 18:45
  • +1 While Python `http.server` is a good option for trivial cases, this is the production-grade solution that can handle things like downloading large files with support for resuming. – EM0 Dec 08 '21 at 16:26
17

I use HFS sometimes in a pinch. Maybe you'll find it useful. HFS

jcnaquin
  • 446
  • 2
  • 5
4

I had the same need and developed Quickshare, it works on Linux and Windows and does what you want (you run it select a directory, and voila). If you wish, it also supports HTTP-AUTH, IP white/black lists, and uploads.

Here is a screenshot and example of usage.

houbysoft
  • 4,434
  • 11
  • 40
  • 62
  • 4
    The links in this answer point to a server with "internal error 500". I tried to recover the pages from the Wayback Machine but go the message "This URL has been excluded from the Wayback Machine." :( – Tony Nov 30 '18 at 23:57
  • @Tony I found something that claims to be a download link, but Quickshare has an exploit where you can "..." from the root to break out of the jail. – Patrick M Feb 17 '22 at 03:03
2

I am not sure on the one that you used, but Cassini is free and pretty simple.

Available here - http://blogs.msdn.com/b/dmitryr/archive/2008/10/03/cassini-for-framework-3-5.aspx

Glorfindel
  • 4,089
  • 8
  • 24
  • 37
William Hilsum
  • 116,650
  • 19
  • 182
  • 266
  • Cassini later turned into the web server used in Visual Studio for testing web sites. Far from an exe to copy and double-click. Nowadays, there's also IIS Express. – Martin R-L Jan 16 '11 at 17:38
1

Sounds like you're referring to XAMPP, it does just that.

davidlj95
  • 3
  • 3
peter
  • 562
  • 1
  • 4
  • 11
  • 4
    XAMPP is an Apache distribution containing MySQL, PHP and Perl. – Nifle Jan 09 '11 at 20:18
  • 2
    While it isn't JUST a web server, it is simple web server that's unzip, run and there you go (with added options for more advanced stuff, obviously) – WernerCD Jan 10 '11 at 00:49
  • 2
    `it is simple web server that's unzip, run and there you go` @WernerCD, yes if by simple you easy-to-use, but certainly not simple as in *basic* (which is specifically what this question is about). – Synetech May 13 '14 at 01:56
1

http://ultidev.com/products/Cassini/ - MS Cassini fork that can run as a service, C/P from site:

Here are features present in UltiDev Cassini, but not in the original MS Cassini:

* Comes ready for distribution with Visual Studio ASP.NET applications.
* Runs as a windows service;
* Hosts and runs multiple ASP.NET applications;
* Provides management UI and simple API for configuring web applications;
* Comes in two flavors: 2.0 version for ASP.NET 3.5, 3.0 and 2.0 applications, and 1.1 for applications compiled for ASP.NET 1.1.
Antonio Bakula
  • 412
  • 1
  • 7
  • 13
  • Yet another, but open source, Cassini fork is at the https://github.com/adriancs2/CassiniDev – Vadim Jul 19 '22 at 17:17
0

I once used Wapache, which was even easier, as it required no setup.

Wapache is a software that lets you to create desktop applications using web development technology. It combines a modified version of the Apache 2 HTTP server with an embedded Internet Explorer web browser. Requests to the "web server" are handled internally. Data does not travel through the networking layer, ensuring quick response and reliable operation. Wapache also lets you control various browser settings, such as window dimensions and Javascript availability, giving you a consistent runtime environment.

jowido
  • 616
  • 4
  • 4
0

I found Abyss the easiest thing I know of, I'd still personally prefer to package up lighttpd or similar.

http://www.aprelium.com/

tobylane
  • 1,339
  • 1
  • 10
  • 14
  • Far from as easy as copy an exe and double-click it though... http://www.aprelium.com/data/doc/2/abyssws-win-doc-html/setupsimple.html – Martin R-L Jan 16 '11 at 19:01