3
나는이 스크립트를 가지고 있는데, 백그라운드에서 실행되도록하는 방법을 모르므로, 세션을 닫을 때도 닫습니다. 나는 그것을 crontab에 넣으려고했지만 index.html을 찾지 못하고 /에있는 파일 목록을 보여줍니다. 당신이 당신의 쉘에서 프로그램을 분리하는 방법에 대한 요구하고있다 기본적으로배경에 간단한 HTTPServer 파이썬
#! /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()`