I have a Windows user I want to share a large file with, they have Firefox with I understand supports resumable HTTP file downloads, and I have Ubuntu Linux, but limited disk space and such, so I don't want a full blown solution like Apache's web server.

I'd like to just run the server via the command line or GUI when I want, not on boot.

If I can avoid it, I don't want to edit a config file - I'd rather just give a command line argument for it's port, I'm used to using python -m SimpleHTTPServer - but I don't think it is resumable.

link|improve this question

50% accept rate
"share a ... file" - So... you want to transfer a file eh, and you don't want to use the FILE TRANSFER PROTOCOL why? – ta.speot.is Jul 7 '11 at 8:10
2  
I don't find name-ism useful here, there is nothing wrong with wanting to use a browser to download a file especially since the end user is comfortable with it. Don't see what should be complex or problemabtic about running a resumable HTTP server, do you? – Luke Stanley Jul 7 '11 at 8:13
I have a partial answer I may post in ~6 hours (rep < 100): pastebin.com/DS0wedwk – Luke Stanley Jul 7 '11 at 9:36
@todda.speot.is: maybe because FTP is insecure and sends password across the network. – MaxMackie Jul 7 '11 at 13:08
1  
Mainly it's because simplicity for end users is king. – Luke Stanley Jul 7 '11 at 21:07
show 6 more comments
feedback

2 Answers

up vote 5 down vote accepted

Use thttpd.

thttpd -d /home/bob/sharedfolder -p 8080

The directory /home/bob/sharedfolder would become accessible at http://address:8080.

screenshot of thttpd directory listing in Chrome showing localhost on port 8080


lighttpd can be used in a similar way, although it needs a tiny config file. For example:

server.document-root = "/home/bob/sharedfolder"
server.port          = 8080
dir-listing.activate = "enable"

which is then ran like this:

lighttpd -f foo.conf
link|improve this answer
Thanks grawity, I made some edits. Would appreciate some question upvotes. – Luke Stanley Jul 7 '11 at 21:22
even python -m SimpleHTTPServer 8000 should be enough ... :) – akira Jan 23 at 18:19
@akira: SimpleHTTPServer does not support byte ranges, meaning it cannot resume interrupted transfers. Test with curl http://localhost:8000/testfile -o /dev/null -C 100, for example. – grawity Jan 23 at 18:21
This is exactly what I needed, using lighttpd now and it's working great. – Rob Jan 23 at 18:38
@grawity: true. but that aside: might be a viable option. missing byte range: thats why i only put it aside your answer and not as a standalone answer. – akira Jan 24 at 7:00
feedback

Use Lighttpd - You're using Linux so I guess you're familiar with the drill! Place the file you want to share in the /var/www folder Modify the init.d conf file to remove Lighttpd from bootup daemons.

Lighttpd does all you want and more - And, its not small, its TINY! ;)

link|improve this answer
Yeah I used Monkey already. Arbitrary difference perhaps. See: pastebin.com/DS0wedwk but I'm looking for a 0 config file solution if possible :) – Luke Stanley Jul 7 '11 at 9:35
feedback

Your Answer

 
or
required, but never shown

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