Gentoo Archives: gentoo-user

From: Mark Knecht <markknecht@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] The SIMPLEST web server to config (this time - just for serving video files) ?
Date: Sun, 13 Nov 2011 19:46:54
Message-Id: CAK2H+efCcmh2Ejx8muWob9WpybtKUA6XN4P7Wy=-8+Js7oeH2A@mail.gmail.com
In Reply to: Re: [gentoo-user] The SIMPLEST web server to config (this time - just for serving video files) ? by Pandu Poluan
1 On Sun, Nov 13, 2011 at 11:16 AM, Pandu Poluan <pandu@××××××.info> wrote:
2 >
3 > On Nov 14, 2011 1:25 AM, "Mark Knecht" <markknecht@×××××.com> wrote:
4 <SNIP>
5 >>   From browsing around a lot of pages on the web it seems that there
6 >> are a number of small & light servers (in terms of memory anyway) in
7 >> portage. Some names: fnord, thttpd, boa, monkeyd & cherokee. Does
8 >> anyone know if one of those would fit my main need of just being
9 >> extremely simple to setup and keep running for this one purpose?
10 >>
11 >> Thanks in advance,
12 >> Mark
13 >>
14 >
15 > Try:
16 >
17 > python -m SimpleHTTPServer <port number> &
18 >
19 > (the trailing ampersand detaches the process and makes it run in the
20 > background)
21 >
22 > Or for something that survives a logout, try:
23 >
24 > nohup python -m SimpleHTTPServer <port number> &
25 >
26 > Of course, RAM usage will be huge compared to the lightweight HTTP servers,
27 > but I can't think of a simpler thing atm.
28 >
29 > Rgds,
30 >
31
32 Wow! That certainly qualifies for the simple part! The trick seemed to
33 be to cd to the video directory before running python, but once I did
34 that I am able to get video.
35
36 One 'problem' if you will is the video isn't streaming but rather the
37 whole file is being copied and then xine is being run. That leads to
38 no disk space over time.
39
40 Is this a function of Firefox being set up to use xine as opposed to
41 some other app or plugin? I'd really like to understand a little more
42 about getting it to stream instead of copy, if possible.
43
44 The other thing I just tested was accessing the server using my wife's
45 iPod Touch. It can browse to the video files but then Quicktime
46 doesn't play them. Back in the python terminal I see a lot of message
47 like this:
48
49 ----------------------------------------
50 192.168.1.243 - - [13/Nov/2011 11:44:26] "GET /H/Howard%27s%20End.m4v
51 HTTP/1.1" 200 -
52 ----------------------------------------
53 Exception happened during processing of request from ('192.168.1.243', 49450)
54 Traceback (most recent call last):
55 File "/usr/lib64/python2.7/SocketServer.py", line 284, in
56 _handle_request_noblock
57 self.process_request(request, client_address)
58 File "/usr/lib64/python2.7/SocketServer.py", line 310, in process_request
59 self.finish_request(request, client_address)
60 File "/usr/lib64/python2.7/SocketServer.py", line 323, in finish_request
61 self.RequestHandlerClass(request, client_address, self)
62 File "/usr/lib64/python2.7/SocketServer.py", line 641, in __init__
63 self.finish()
64 File "/usr/lib64/python2.7/SocketServer.py", line 694, in finish
65 self.wfile.flush()
66 File "/usr/lib64/python2.7/socket.py", line 303, in flush
67 self._sock.sendall(view[write_offset:write_offset+buffer_size])
68 error: [Errno 32] Broken pipe
69 ----------------------------------------
70
71 None the less it's an interesting start. Thanks!!
72
73 Cheers,
74 Mark

Replies