3
我有这个脚本,我不知道如何让它在后台运行,因为当我关闭它的会话也关闭了。我试着把它放在crontab上,但没有找到index.html,并在/中显示了文件列表。简单的HTTPServer python背景
#! /opt/python3/bin/python3
from http.server import HTTPServer, CGIHTTPRequestHandler
port = 8000
httpd = HTTPServer(('', port), CGIHTTPRequestHandler)
print("Starting simple_httpd on port: " + str(httpd.server_port))
httpd.serve_forever()`