python-启动简单的HTTP服务

有时候需要简单的httpd用来测试,使用此方法可以快速启动一个测试服务器:

test@local:~/http$ nano -w index.html 
test@local:~/http$ mkdir images
test@local:~/http$ mkdir css
test@local:~/http$ python -m SimpleHTTPServer 9991
Serving HTTP on 0.0.0.0 port 9991 ...
127.0.0.1 - - [24/May/2018 09:23:02] "GET / HTTP/1.1" 200 -

访问:

http://localhost:9991/


猜你喜欢

转载自blog.csdn.net/kozazyh/article/details/80429723