You can use Python as a quick way to host static content. On Windows, there are many options for running Python, I've personally used CygWin and ActivePython.
To use Python as a simple HTTP server just change your working directory to the folder with your static content and type python -m SimpleHTTPServer 8000, everything in the directory will be available at http:/localhost:8000/
Python 3
To do this with Python, 3.4.1 (and probably other versions of Python 3), use the http.server module:
安全性、速度、合规性和灵活性——所有这些都描述了lighttpd(代词lighty),它正在迅速重新定义网络服务器的效率;因为它是针对高性能环境而设计和优化的。与其他 Web 服务器相比,lighttpd 内存占用较小,可有效管理 CPU 负载,并具有高级功能集(FastCGI、SCGI、Auth、输出压缩、URL 重写等),是每个服务器的完美解决方案那正在遭受负载问题。最重要的是,它是根据修订后的 BSD 许可证获得许可的开源代码。
Security, speed, compliance, and flexibility -- all of these describe lighttpd (pron. lighty) which is rapidly redefining efficiency of a webserver; as it is designed and optimized for high performance environments. With a small memory footprint compared to other web-servers, effective management of the cpu-load, and advanced feature set (FastCGI, SCGI, Auth, Output-Compression, URL-Rewriting and many more) lighttpd is the perfect solution for every server that is suffering load problems. And best of all it's Open Source licensed under the revised BSD license.
看看卡西尼号。这基本上就是 Visual Studio 用于其内置调试 Web 服务器的内容。我已经将它与 Umbraco 一起使用,看起来相当不错。
Have a look at Cassini. This is basically what Visual Studio uses for its built-in debug web server. I've used it with Umbraco and it seems quite good.
发布评论
评论(8)
您可以使用 Python 作为托管静态内容的快速方法。在 Windows 上,有很多运行 Python 的选项,我个人使用过 CygWin 和 ActivePython。
要将 Python 用作简单 HTTP 服务器,只需将工作目录更改为以下文件夹:您的静态内容并输入
python -m SimpleHTTPServer 8000
,目录中的所有内容都将在http:/localhost:8000/
Python 3
中使用 Python 3.4 来执行此操作。 1(可能还有 Python 3 的其他版本),使用
http.server
模块:在 Windows 上:
You can use Python as a quick way to host static content. On Windows, there are many options for running Python, I've personally used CygWin and ActivePython.
To use Python as a simple HTTP server just change your working directory to the folder with your static content and type
python -m SimpleHTTPServer 8000
, everything in the directory will be available athttp:/localhost:8000/
Python 3
To do this with Python, 3.4.1 (and probably other versions of Python 3), use the
http.server
module:On Windows:
看看 mongoose:
如果需要的话归档
Have a look at mongoose:
file if required
我知道的最小的一个是lighttpd。
编辑:删除了 Windows 版本链接,现在是垃圾邮件/恶意软件插件网站。
The smallest one I know is lighttpd.
Edit: removed Windows version link, now a spam/malware plugin site.
考虑thttpd。它可以在windows下运行。
引用维基百科:
可以使用在 cygwin 下使用 cygwin dll 编译的 thttpd-2.25b 版本。它是单线程的,特别适合处理图像。
Consider thttpd. It can run under windows.
Quoting wikipedia:
A version of thttpd-2.25b compiled under cygwin with cygwin dll's is available. It is single threaded and particularly good for servicing images.
我玩了一下 Rupy。它是一个非常简洁的开源 (GPL) Java 应用程序,重量不到 60KB。尝试一下!
I played a bit with Rupy. It's a pretty neat, open source (GPL) Java application and weighs less than 60KB. Give it a try!
您可以尝试运行基于Twisted的简单Web服务器
You can try running a simple web server based on Twisted
nginx 或 G-WAN
http ://nbonvin.wordpress.com/2011/03/24/serving-small-static-files-which-server-to-use/
nginx or G-WAN
http://nbonvin.wordpress.com/2011/03/24/serving-small-static-files-which-server-to-use/
看看卡西尼号。这基本上就是 Visual Studio 用于其内置调试 Web 服务器的内容。我已经将它与 Umbraco 一起使用,看起来相当不错。
Have a look at Cassini. This is basically what Visual Studio uses for its built-in debug web server. I've used it with Umbraco and it seems quite good.