私はPythonのサーバとして、次のコードを持っている:PythonのHTTPServerを使用してDocumentRootを設定する方法は?
#!/usr/bin/python3
from http.server import HTTPServer, CGIHTTPRequestHandler
port = 8080
host_name = "localhost"
httpd = HTTPServer((host_name, port), CGIHTTPRequestHandler)
print("server started, to quit press <ctrl-c>")
httpd.serve_forever()
はどのようにして、サーバーからページを提供されているのDocumentRootを設定してください。
すばやくありがとう – chutsu