Util for a light weight web server on linux
Out of curiosity rather than necessity, Is there a util on Linux to set up very light weight web server ?
Want to use it for only gets and would like a very fast i开发者_如何学Cnstall. Basically would like to programmatically start the web server.
Please let me know if the question feels incomplete and you would like more information.
netcat
while true; do nc -l -p 80 -q 1 < somepage.html; done
Source.
you may look at SimpleHTTPServer. It is in Python, but useful enough. Here is how to use it.
jetty is pretty popular
Lighttpd is a pretty awesome light-weight server for linux
http://www.lighttpd.net/
Wikipedia also has an article comparing lightweight web servers: http://en.wikipedia.org/wiki/Comparison_of_lightweight_web_servers
There are several light HTTP Daemons for Linux.
I would recomend:
- Lighttpd - http://www.lighttpd.net/
- NGix - http://nginx.org/
I'm sure other people have other sugestions.
精彩评论