I can recommend
nginx and
mongoose. I've had more experience with nginx, and it's quite a widely used, but little known web sever. Let us know what you decide on and if you run into trouble.
Ehtyar.
mongoose is super cool. Thanks
I need to extend Mongoose to something like
http://127.0.0.1:8080/E/mp3/?format=podcastor
http://127.0.0.1:8080/E/mp3/?format=m3uany ideas?Fixed it with some python script:
[
copy or print]
#!/usr/bin/env python
#coding:utf-8
import os
import mongoose
import sys
def m3u_handler(conn, info, data):
conn.printf('%s', 'HTTP/1.0 200 OK\r\n')
conn.printf('%s', 'Content-Type: audio/x-mpegurl\r\n')
r = '#EXTM3U\n\n' + '\n'.join( os.listdir(os.path.join(server.root,info.uri.replace('/:m3u', ''))))
conn.printf('%s', 'Content-Length: %d\r\n\r\n' % len(r))
conn.printf(r)
server = mongoose.Mongoose(ports='80', root='E:/Media') #os.getcwd())
server.set_uri_callback(r'*/:m3u', m3u_handler, 0)
#server.set_error_callback(404, error_404_handler, 0)
# Mongoose options can be retrieved by asking an attribute
print 'Starting Mongoose %s on port(s) %s ' % (server.version, server.ports)
print 'CGI extensions: %s' % server.cgi_ext
# Serve connections until 'enter' key is pressed on a console
sys.stdin.read(1)
# Deleting server object stops all serving threads
print 'Stopping server.'
del server
Usage: run the python script, it will share your E:\Media folder on
http://127.0.0.1/use
http://127.0.0.1/:m3u to change the output format to .m3u with correct MIME